[hackers] [ubase] Use config.def.h || sin

From: <git_AT_suckless.org>
Date: Sun, 09 Feb 2014 13:30:27 +0100

commit 2033ecb340c94dd8eed80d4ed1da2b277f10d8f1
Author: sin <sin_AT_2f30.org>
Date: Sun Feb 9 12:25:36 2014 +0000

    Use config.def.h

diff --git a/Makefile b/Makefile
index 77d650e..0c8cb72 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -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 \
_AT_@ -76,7 +76,11 @@ binlib: util.a
 
 bin: $(BIN)
 
-$(OBJ): util.h config.mk
+$(OBJ): config.h util.h config.mk
+
+config.h:
+ _AT_echo creating $@ from config.def.h
+ _AT_cp config.def.h $@
 
 .o:
         _AT_echo LD $@
_AT_@ -119,10 +123,11 @@ dist: clean
         _AT_gzip ubase-$(VERSION).tar
         _AT_rm -rf ubase-$(VERSION)
 
-ubase-box: $(SRC) util.a
+ubase-box: config.h $(SRC) util.a
         _AT_echo creating box binary
         _AT_mkdir -p build
         _AT_cp $(HDR) build
+ _AT_cp config.h build
         _AT_for f in $(SRC); do sed "s/^main(/`basename $$f .c`_&/" < $$f > build/$$f; done
         _AT_echo '#include <libgen.h>' > build/$@.c
         _AT_echo '#include <stdio.h>' >> build/$@.c
diff --git a/config.def.h b/config.def.h
new file mode 100644
index 0000000..a85d6bd
--- /dev/null
+++ b/config.def.h
_AT_@ -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
deleted file mode 100644
index a85d6bd..0000000
--- a/config.h
+++ /dev/null
_AT_@ -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"
Received on Sun Feb 09 2014 - 13:30:27 CET

This archive was generated by hypermail 2.3.0 : Sun Feb 09 2014 - 13:36:12 CET