ubase

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

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

Use config.def.h

Diffstat:
Makefile | 11++++++++---
config.def.h | 4++++
config.h | 4----
3 files changed, 12 insertions(+), 7 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.def.h b/config.def.h @@ -0,0 +1,4 @@ +/* See LICENSE file for copyright and license details. */ + +#define ENV_SUPATH "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" +#define ENV_PATH "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" diff --git a/config.h b/config.h @@ -1,4 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -#define ENV_SUPATH "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -#define ENV_PATH "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"