2022-12-16 13:39:18 -05:00
|
|
|
DEPS = utf8 lowdown sxml-transforms clojurian symbol-utils scss srfi-1 srfi-13 srfi-14 ersatz
|
2022-12-02 16:41:55 -05:00
|
|
|
SRC = main.scm
|
2023-02-05 03:12:13 -05:00
|
|
|
LOCAL_MODULES = utils utils-git
|
2022-12-02 16:41:55 -05:00
|
|
|
DIR_INSTALL ?= /usr/local/bin
|
|
|
|
BIN = repo2html
|
|
|
|
|
2023-02-05 00:40:06 -05:00
|
|
|
default: compile
|
2022-12-02 16:41:55 -05:00
|
|
|
|
2023-02-05 01:44:52 -05:00
|
|
|
%: %.scm
|
2023-02-24 02:37:07 -05:00
|
|
|
csc -O3 -static -strip $<
|
2023-02-05 00:40:06 -05:00
|
|
|
|
|
|
|
# Note: things break if you use -O5 here.
|
|
|
|
%.import.scm: %.scm
|
2023-02-24 02:37:07 -05:00
|
|
|
csc -O3 -static -c -unit $* -emit-import-library $* $<
|
2023-02-05 00:40:06 -05:00
|
|
|
|
2023-02-24 02:37:07 -05:00
|
|
|
$(DIR_INSTALL)/%: %
|
|
|
|
install -Dm755 $< -D $@
|
2023-02-05 00:40:06 -05:00
|
|
|
|
2023-02-24 02:37:07 -05:00
|
|
|
compile: $(BIN)
|
|
|
|
rm -f $<.link
|
|
|
|
@ls -sh $<
|
|
|
|
@echo "Finished compiling static binary $<!"
|
2022-12-02 16:41:55 -05:00
|
|
|
|
2023-02-05 01:44:52 -05:00
|
|
|
foo: utils.import.scm utils.o
|
2023-02-05 03:12:13 -05:00
|
|
|
repo2html: utils.import.scm utils.o utils-git.import.scm utils-git.o
|
2023-02-05 01:44:52 -05:00
|
|
|
|
2022-12-02 16:41:55 -05:00
|
|
|
dependencies:
|
|
|
|
chicken-install $(DEPS)
|
|
|
|
|
2023-02-24 02:37:07 -05:00
|
|
|
install: $(DIR_INSTALL)/$(BIN)
|
2022-12-02 16:41:55 -05:00
|
|
|
|
|
|
|
uninstall:
|
2023-02-24 02:37:07 -05:00
|
|
|
rm -f $(DIR_INSTALL)/$(BIN)
|
2022-12-02 16:41:55 -05:00
|
|
|
|
|
|
|
clean:
|
2023-02-24 02:37:07 -05:00
|
|
|
rm -f $(BIN) foo repo2html *.link *.o *.import.scm
|
2022-12-02 16:41:55 -05:00
|
|
|
|
2022-12-16 19:39:50 -05:00
|
|
|
compile-on-debian-11:
|
|
|
|
# builds repo2html compatible with systems running glibc-2.31 and higher.
|
2022-12-18 14:57:18 -05:00
|
|
|
docker build docker
|
|
|
|
# the docker image "repo2htmlbuilder:latest" now exists on your system.
|
|
|
|
# this will make the next time you run this command go faster.
|
|
|
|
# to delete it and reclaim the space run "docker image rm repo2htmlbuilder:latest"
|
2022-12-23 00:03:35 -05:00
|
|
|
docker run -v $(shell pwd):/tmp/x -w /tmp/x --rm repo2htmlbuilder make compile
|