ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit 2033ecb340c94dd8eed80d4ed1da2b277f10d8f1
parent 33c94d161d9ec06c1816e19c5f82e837b84c049e
Author: sin <sin@2f30.org>
Date:   Sun,  9 Feb 2014 12:25:36 +0000

Use config.def.h

Diffstat:
MMakefile | 11++++++++---
Rconfig.h -> config.def.h | 0
2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -3,7 +3,7 @@ include config.mk .POSIX: .SUFFIXES: .c .o -HDR = arg.h config.h grabmntinfo.h proc.h reboot.h util.h +HDR = arg.h config.def.h grabmntinfo.h proc.h reboot.h util.h LIB = \ util/agetcwd.o \ util/apathmax.o \ @@ -76,7 +76,11 @@ binlib: util.a bin: $(BIN) -$(OBJ): util.h config.mk +$(OBJ): config.h util.h config.mk + +config.h: + @echo creating $@ from config.def.h + @cp config.def.h $@ .o: @echo LD $@ @@ -119,10 +123,11 @@ dist: clean @gzip ubase-$(VERSION).tar @rm -rf ubase-$(VERSION) -ubase-box: $(SRC) util.a +ubase-box: config.h $(SRC) util.a @echo creating box binary @mkdir -p build @cp $(HDR) build + @cp config.h build @for f in $(SRC); do sed "s/^main(/`basename $$f .c`_&/" < $$f > build/$$f; done @echo '#include <libgen.h>' > build/$@.c @echo '#include <stdio.h>' >> build/$@.c diff --git a/config.h b/config.def.h