fix what i broke in previous commit. also fix docker building

This commit is contained in:
Michael F. Lamb 2023-02-26 22:36:00 -08:00
parent 2cd9bf5855
commit 0eba832f8a
3 changed files with 11 additions and 8 deletions

View file

@ -4,24 +4,27 @@ LOCAL_MODULES = utils utils-git
DIR_INSTALL ?= /usr/local/bin DIR_INSTALL ?= /usr/local/bin
BIN = repo2html BIN = repo2html
default: compile .PHONY: clean clean-after-compile uninstall install dependencies
default: $(BIN) clean-after-compile
%: %.scm %: %.scm
csc -O3 -static -strip $< csc -O3 -static -strip $<
# Note: things break if you use -O5 here. # Note: things break if you use -O5 here.
%.import.scm: %.scm %.import.scm: %.o
# $@ will have been created by the command to build $<
%.o: %.scm
csc -O3 -static -c -unit $* -emit-import-library $* $< csc -O3 -static -c -unit $* -emit-import-library $* $<
$(DIR_INSTALL)/%: % $(DIR_INSTALL)/%: %
install -Dm755 $< -D $@ install -Dm755 $< -D $@
compile: $(BIN) clean-after-compile: $(BIN)
rm -f $<.link rm -f $<.link
@ls -sh $< @ls -sh $<
@echo "Finished compiling static binary $<!" @echo "Finished compiling static binary $<!"
foo: utils.import.scm utils.o
repo2html: utils.import.scm utils.o utils-git.import.scm utils-git.o repo2html: utils.import.scm utils.o utils-git.import.scm utils-git.o
dependencies: dependencies:
@ -37,8 +40,8 @@ clean:
compile-on-debian-11: compile-on-debian-11:
# builds repo2html compatible with systems running glibc-2.31 and higher. # builds repo2html compatible with systems running glibc-2.31 and higher.
docker build docker docker build docker -t repo2htmlbuilder
# the docker image "repo2htmlbuilder:latest" now exists on your system. # the docker image "repo2htmlbuilder:latest" now exists on your system.
# this will make the next time you run this command go faster. # 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" # to delete it and reclaim the space run "docker image rm repo2htmlbuilder:latest"
docker run -v $(shell pwd):/tmp/x -w /tmp/x --rm repo2htmlbuilder make compile docker run -v $(shell pwd):/tmp/x -w /tmp/x --rm repo2htmlbuilder make

View file

@ -1,4 +1,4 @@
;;;; utils-git.import.scm - GENERATED BY CHICKEN 5.2.0 -*- Scheme -*- ;;;; utils-git.import.scm - GENERATED BY CHICKEN 5.3.0 -*- Scheme -*-
(##sys#with-environment (##sys#with-environment
(lambda () (lambda ()

View file

@ -1,4 +1,4 @@
;;;; utils.import.scm - GENERATED BY CHICKEN 5.2.0 -*- Scheme -*- ;;;; utils.import.scm - GENERATED BY CHICKEN 5.3.0 -*- Scheme -*-
(##sys#with-environment (##sys#with-environment
(lambda () (lambda ()