clone url: git://git.m455.casa/repo2html
Makefile
| 1 | DEPS = utf8 lowdown sxml-transforms clojurian symbol-utils scss srfi-1 srfi-13 srfi-14 ersatz |
| 2 | SRC = main.scm |
| 3 | LOCAL_MODULES = utils utils-git |
| 4 | DIR_INSTALL ?= /usr/local/bin |
| 5 | BIN = repo2html |
| 6 | |
| 7 | .PHONY: clean clean-after-compile uninstall install dependencies |
| 8 | |
| 9 | default: $(BIN) clean-after-compile |
| 10 | |
| 11 | %: %.scm |
| 12 | csc -O3 -static -strip $< |
| 13 | |
| 14 | # Note: things break if you use -O5 here. |
| 15 | %.import.scm: %.o |
| 16 | # $@ will have been created by the command to build $< |
| 17 | %.o: %.scm |
| 18 | csc -O3 -static -c -unit $* -emit-import-library $* $< |
| 19 | |
| 20 | $(DIR_INSTALL)/%: % |
| 21 | install -Dm755 $< -D $@ |
| 22 | |
| 23 | clean-after-compile: $(BIN) |
| 24 | rm -f $<.link |
| 25 | @ls -sh $< |
| 26 | @echo "Finished compiling static binary $<!" |
| 27 | |
| 28 | repo2html: utils.import.scm utils.o utils-git.import.scm utils-git.o |
| 29 | |
| 30 | dependencies: |
| 31 | chicken-install $(DEPS) |
| 32 | |
| 33 | install: $(DIR_INSTALL)/$(BIN) |
| 34 | |
| 35 | uninstall: |
| 36 | rm -f $(DIR_INSTALL)/$(BIN) |
| 37 | |
| 38 | clean: |
| 39 | rm -f $(BIN) foo repo2html *.link *.o *.import.scm |
| 40 | |
| 41 | compile-on-debian-11: |
| 42 | # builds repo2html compatible with systems running glibc-2.31 and higher. |
| 43 | docker build docker -t repo2htmlbuilder |
| 44 | # the docker image "repo2htmlbuilder:latest" now exists on your system. |
| 45 | # this will make the next time you run this command go faster. |
| 46 | # to delete it and reclaim the space run "docker image rm repo2htmlbuilder:latest" |
| 47 | docker run -v $(shell pwd):/tmp/x -w /tmp/x --rm repo2htmlbuilder make |