[hackers] [scc] Fix parallel build of multi support || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sun, 24 Jan 2016 16:19:20 +0100 (CET)

commit 4506a7ac70b36365f7448c3fe3840550f3230874
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Sun Jan 24 10:03:25 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Sun Jan 24 10:03:25 2016 +0100

    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.

diff --git a/Makefile b/Makefile
index bd42eb1..d693b6d 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -4,7 +4,6 @@
 include config.mk
 
 SUBDIRS = lib cc1 cc2
-
 ARCHS = z80 i386-sysv amd64-sysv
 
 all clean:
_AT_@ -13,15 +12,22 @@ all clean:
                 (cd $$i; ${MAKE} -$(MAKEFLAGS) $_AT_ || 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=$_AT_ ${MAKE} -e $(MAKEFLAGS) clean $$i || exit); \
+ (cd $$i; \
+ ARCH=$_AT_ ${MAKE} -e -$(MAKEFLAGS) clean ;\
+ ARCH=$_AT_ $(MAKE) -e $$i || exit); \
         done
         ln -f cc1/cc1 bin/cc1-$_AT_
         ln -f cc2/cc2 bin/cc2-$_AT_
diff --git a/cc1/Makefile b/cc1/Makefile
index 01dd816..5d857f8 100644
--- a/cc1/Makefile
+++ b/cc1/Makefile
_AT_@ -7,7 +7,6 @@ OBJS = types.o decl.o lex.o error.o symbol.o main.o expr.o \
 
 all: cc1
 
-
 $(OBJS) : cc1.h ../inc/cc.h ../inc/sizes.h arch/$(ARCH)/arch.h
 
 cc1: $(OBJS) ../lib/libcc.a
Received on Sun Jan 24 2016 - 16:19:20 CET

This archive was generated by hypermail 2.3.0 : Sun Jan 24 2016 - 16:24:26 CET