[hackers] [scc] [libc] Fix Makefiles until POSIX supports -include || Quentin Rameau

From: <git_AT_suckless.org>
Date: Tue, 21 Mar 2017 12:08:57 +0100 (CET)

commit 58d1edd3d722b89b325bee5ef3c2994ec6b8dac2
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sat Mar 18 01:19:40 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Tue Mar 21 12:07:54 2017 +0100

    [libc] Fix Makefiles until POSIX supports -include

diff --git a/libc/src/Makefile b/libc/src/Makefile
index f84edee..863a3e9 100644
--- a/libc/src/Makefile
+++ b/libc/src/Makefile
_AT_@ -6,7 +6,8 @@ include ../../config.mk
 SYSDIR = sys/$(ARCH)-$(SYS)
 SYSINC = $(SYSDIR)/system.mk
 
--include $(SYSINC)
+SYSINCLUDE = /dev/null
+include $(SYSINCLUDE)
 
 LIBCOBJ = assert.o strcpy.o strcmp.o strlen.o strchr.o \
           strrchr.o strcat.o strncmp.o strncpy.o strncat.o strcoll.o \
_AT_@ -27,10 +28,10 @@ all.start: libc.a
 clean: clean.bootstrap
 clean.start:
         rm -f *.o libc.a
- cd $(SYSDIR) && $(MAKE) -e clean
+ cd $(SYSDIR) && $(MAKE) clean
 
 all.bootstrap clean.bootstrap: $(SYSINC)
- $(MAKE) -e $(_AT_:%.bootstrap=%.start)
+ $(MAKE) -e SYSINCLUDE="$(SYSINC)" $(_AT_:%.bootstrap=%.start)
 
 $(SYSINC): $(SYSDIR)/Makefile $(SYSDIR)/syscall.lst
         cd $(SYSDIR) && $(MAKE) -e system.mk
_AT_@ -40,4 +41,4 @@ libc.a: $(SYSINC) $(OBJ)
         ranlib $_AT_
 
 $(LIBCSYSOBJ):
- cd $(SYSDIR) && $(MAKE) -e
+ cd $(SYSDIR) && $(MAKE)
diff --git a/libc/src/sys/amd64-sysv-linux/Makefile b/libc/src/sys/amd64-sysv-linux/Makefile
index 555b8a9..7715b92 100644
--- a/libc/src/sys/amd64-sysv-linux/Makefile
+++ b/libc/src/sys/amd64-sysv-linux/Makefile
_AT_@ -2,8 +2,11 @@
 .POSIX:
 
 include ../../../../config.mk
--include system.mk
--include sysgen.mk
+
+SYSTEMINC = /dev/null
+include $(SYSTEMINC)
+SYSGENINC = /dev/null
+include $(SYSGENINC)
 
 GENASM = $(GENOBJ:.o=.s)
 OBJ =
_AT_@ -16,7 +19,8 @@ clean.start:
         rm -f *.o $(GENASM) system.mk sysgen.mk
 
 all.bootstrap clean.bootstrap: system.mk sysgen.mk
- $(MAKE) -e $(_AT_:%.bootstrap=%.start)
+ $(MAKE) -e SYSTEMINC=system.mk SYSGENINC=sysgen.mk \
+ $(_AT_:%.bootstrap=%.start)
 
 system.mk: Makefile syscall.lst
         printf '%s ' 'SYSOBJ =' \
diff --git a/libc/src/sys/i386-sysv-linux/Makefile b/libc/src/sys/i386-sysv-linux/Makefile
index 555b8a9..7715b92 100644
--- a/libc/src/sys/i386-sysv-linux/Makefile
+++ b/libc/src/sys/i386-sysv-linux/Makefile
_AT_@ -2,8 +2,11 @@
 .POSIX:
 
 include ../../../../config.mk
--include system.mk
--include sysgen.mk
+
+SYSTEMINC = /dev/null
+include $(SYSTEMINC)
+SYSGENINC = /dev/null
+include $(SYSGENINC)
 
 GENASM = $(GENOBJ:.o=.s)
 OBJ =
_AT_@ -16,7 +19,8 @@ clean.start:
         rm -f *.o $(GENASM) system.mk sysgen.mk
 
 all.bootstrap clean.bootstrap: system.mk sysgen.mk
- $(MAKE) -e $(_AT_:%.bootstrap=%.start)
+ $(MAKE) -e SYSTEMINC=system.mk SYSGENINC=sysgen.mk \
+ $(_AT_:%.bootstrap=%.start)
 
 system.mk: Makefile syscall.lst
         printf '%s ' 'SYSOBJ =' \
diff --git a/libc/src/sys/qbe-linux/Makefile b/libc/src/sys/qbe-linux/Makefile
index 555b8a9..7715b92 100644
--- a/libc/src/sys/qbe-linux/Makefile
+++ b/libc/src/sys/qbe-linux/Makefile
_AT_@ -2,8 +2,11 @@
 .POSIX:
 
 include ../../../../config.mk
--include system.mk
--include sysgen.mk
+
+SYSTEMINC = /dev/null
+include $(SYSTEMINC)
+SYSGENINC = /dev/null
+include $(SYSGENINC)
 
 GENASM = $(GENOBJ:.o=.s)
 OBJ =
_AT_@ -16,7 +19,8 @@ clean.start:
         rm -f *.o $(GENASM) system.mk sysgen.mk
 
 all.bootstrap clean.bootstrap: system.mk sysgen.mk
- $(MAKE) -e $(_AT_:%.bootstrap=%.start)
+ $(MAKE) -e SYSTEMINC=system.mk SYSGENINC=sysgen.mk \
+ $(_AT_:%.bootstrap=%.start)
 
 system.mk: Makefile syscall.lst
         printf '%s ' 'SYSOBJ =' \
diff --git a/libc/src/sys/z80-linux/Makefile b/libc/src/sys/z80-linux/Makefile
index 555b8a9..7715b92 100644
--- a/libc/src/sys/z80-linux/Makefile
+++ b/libc/src/sys/z80-linux/Makefile
_AT_@ -2,8 +2,11 @@
 .POSIX:
 
 include ../../../../config.mk
--include system.mk
--include sysgen.mk
+
+SYSTEMINC = /dev/null
+include $(SYSTEMINC)
+SYSGENINC = /dev/null
+include $(SYSGENINC)
 
 GENASM = $(GENOBJ:.o=.s)
 OBJ =
_AT_@ -16,7 +19,8 @@ clean.start:
         rm -f *.o $(GENASM) system.mk sysgen.mk
 
 all.bootstrap clean.bootstrap: system.mk sysgen.mk
- $(MAKE) -e $(_AT_:%.bootstrap=%.start)
+ $(MAKE) -e SYSTEMINC=system.mk SYSGENINC=sysgen.mk \
+ $(_AT_:%.bootstrap=%.start)
 
 system.mk: Makefile syscall.lst
         printf '%s ' 'SYSOBJ =' \
Received on Tue Mar 21 2017 - 12:08:57 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 21 2017 - 12:12:24 CET