shithub: scc

Download patch

ref: f3d06fb5d6fc6d3540f693f883c90c50141fc6f1
parent: 5918a7742bbad4a34ece6c034020c7bc562e0f1f
author: izabera <izaberina@gmail.com>
date: Wed Feb 14 18:13:56 EST 2018

add MFLAGS

--- a/Makefile
+++ b/Makefile
@@ -30,7 +30,7 @@
 	$(FORALL)
 
 tests: all
-	cd tests && $(MAKE) -e all
+	cd tests && $(MAKE) $(MFLAGS) -e all
 
 install: all
 	cp -r rootdir/* $(DESTDIR)$(PREFIX)/
--- a/ar/Makefile
+++ b/ar/Makefile
@@ -17,7 +17,7 @@
 $(DRIVER)/stat.o: $(DRIVER)/stat.h
 
 $(LIBDIR)/libscc.a: $(LIB-OBJ)
-	cd $(LIBDIR) && $(MAKE)
+	cd $(LIBDIR) && $(MAKE) $(MFLAGS)
 
 main.o: $(DRIVER)/stat.h
 
--- a/as/Makefile
+++ b/as/Makefile
@@ -18,7 +18,7 @@
 myro.o: ../inc/myro.h
 
 $(LIBDIR)/libscc.a: $(LIB-OBJ)
-	cd $(LIBDIR) && $(MAKE)
+	cd $(LIBDIR) && $(MAKE) $(MFLAGS)
 
 dep:
 	./gendep.sh $(TARGETS)
--- a/cc1/Makefile
+++ b/cc1/Makefile
@@ -19,7 +19,7 @@
 	cp cc1-* ../rootdir/libexec/scc/
 
 $(LIBDIR)/libscc.a: $(LIB-OBJ)
-	cd $(LIBDIR) && $(MAKE)
+	cd $(LIBDIR) && $(MAKE) $(MFLAGS)
 
 dep:
 	./gendep.sh $(TARGETS)
--- a/cc2/Makefile
+++ b/cc2/Makefile
@@ -20,7 +20,7 @@
 	MKQBE=${MKQBE} ./gendep.sh $(TARGETS)
 
 $(LIBDIR)/libscc.a: $(LIB-OBJ)
-	cd $(LIBDIR) && $(MAKE)
+	cd $(LIBDIR) && $(MAKE) $(MFLAGS)
 
 main.o: error.h
 
--- a/config.mk.def
+++ b/config.mk.def
@@ -53,7 +53,7 @@
 	for i in $(DIRS); \
 	do \
 		cd $$i; \
-		$(MAKE) $@; \
+		$(MAKE) $(MFLAGS) $@; \
 		cd $$pwd; \
 	done
 
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -6,4 +6,4 @@
 include ../config.mk
 
 all dep clean distclean:
-	cd $(DRIVER) && $(MAKE) $@
+	cd $(DRIVER) && $(MAKE) $(MFLAGS) $@
--- a/driver/posix/Makefile
+++ b/driver/posix/Makefile
@@ -32,7 +32,7 @@
 	mv $$$$.sh scpp
 
 $(LIBDIR)/libscc.a:
-	cd $(LIBDIR) && $(MAKE)
+	cd $(LIBDIR) && $(MAKE) $(MFLAGS)
 
 clean:
 	rm -f $(OBJ)
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -9,6 +9,6 @@
 	for i in $(DIRS); \
 	do \
 		cd $$i; \
-		$(MAKE) $@; \
+		$(MAKE) $(MFLAGS) $@; \
 		cd $$pwd; \
 	done
--- a/lib/c/Makefile
+++ b/lib/c/Makefile
@@ -1,4 +1,4 @@
 .POSIX:
 
 all dep clean distclean:
-	cd target && $(MAKE) $@
+	cd target && $(MAKE) $(MFLAGS) $@
--- a/lib/sys/Makefile
+++ b/lib/sys/Makefile
@@ -7,6 +7,6 @@
 	for i in $(SYSS); \
 	do \
 		cd $$i; \
-		$(MAKE) -e SYS=$i $@ ;\
+		$(MAKE) $(MFLAGS) -e SYS=$i $@ ;\
 		cd $$pwd; \
 	done
--- a/lib/sys/common.mk
+++ b/lib/sys/common.mk
@@ -3,7 +3,7 @@
 include ../../../config.mk
 
 all clean distclean: system.mk
-	$(MAKE) ABI=$(ABI) -f ../libsys.mk $@
+	$(MAKE) $(MFLAGS) ABI=$(ABI) -f ../libsys.mk $@
 
 system.mk: syscall.lst
 	rm -f $@; trap "rm -f $$$$.mk" 0 2 3; \
--- a/nm/Makefile
+++ b/nm/Makefile
@@ -14,7 +14,7 @@
 main.o: ../inc/scc.h ../inc/ar.h ../inc/myro.h
 
 $(LIBDIR)/libscc.a: $(LIB-OBJ)
-	cd $(LIBDIR) && $(MAKE)
+	cd $(LIBDIR) && $(MAKE) $(MFLAGS)
 
 dep:
 clean:
--- a/objdump/Makefile
+++ b/objdump/Makefile
@@ -14,7 +14,7 @@
 main.o: ../inc/scc.h ../inc/myro.h ../inc/arg.h
 
 $(LIBDIR)/libscc.a: $(LIB-OBJ)
-	cd $(LIBDIR) && $(MAKE)
+	cd $(LIBDIR) && $(MAKE) $(MFLAGS)
 
 dep:
 clean: