ref: 4506a7ac70b36365f7448c3fe3840550f3230874
parent: 67b76eed613de026a4b40fe5ff06aee8834500ed
author: Roberto E. Vargas Caballero <[email protected]>
date: Sun Jan 24 05:03:25 EST 2016
Fix parallel build of multi support When we have parallel build we have to serialize in several points. We cannot clean and build at the same time, and cannot build several architectures at the same time.
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,6 @@
include config.mk
SUBDIRS = lib cc1 cc2
-
ARCHS = z80 i386-sysv amd64-sysv
all clean:
@@ -13,15 +12,22 @@
(cd $$i; ${MAKE} -$(MAKEFLAGS) $@ || exit); \
done
-multi: $(ARCHS)
+multi:
+ for i in $(ARCHS) ; \
+ do \
+ $(MAKE) -$(MAKEFLAGS) $$i || exit ;\
+ done
lib/libcc.a:
cd lib && $(MAKE) -$(MAKEFLAGS) all
+
$(ARCHS): lib/libcc.a
for i in cc1 cc2; \
do \
- (cd $$i; ARCH=$@ ${MAKE} -e $(MAKEFLAGS) clean $$i || exit); \
+ (cd $$i; \
+ ARCH=$@ ${MAKE} -e -$(MAKEFLAGS) clean ;\
+ ARCH=$@ $(MAKE) -e $$i || exit); \
done
ln -f cc1/cc1 bin/cc1-$@
ln -f cc2/cc2 bin/cc2-$@
--- a/cc1/Makefile
+++ b/cc1/Makefile
@@ -7,7 +7,6 @@
all: cc1
-
$(OBJS) : cc1.h ../inc/cc.h ../inc/sizes.h arch/$(ARCH)/arch.h
cc1: $(OBJS) ../lib/libcc.a