Ticket #526: parallel-build-2.diff.txt

File parallel-build-2.diff.txt, 2.6 KB (added by zbigniew, 6 years ago)
Line 
1diff --git a/GNUmakefile b/GNUmakefile
2index 9bc40ca..c697f14 100644
3--- a/GNUmakefile
4+++ b/GNUmakefile
5@@ -49,6 +49,9 @@ STANDARD_TARGETS \
6          fullcheck libs install-target install-dev bench
7 
8 .PHONY: $(STANDARD_TARGETS) dist boot-chicken
9+# Build this file's targets sequentially.  This avoids executing overlapping
10+# makes if the user specifies multiple targets.
11+.NOTPARALLEL:
12 
13 $(STANDARD_TARGETS):
14        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) CONFIG=$(CONFIG) $@
15diff --git a/rules.make b/rules.make
16index 521a801..8d932cb 100644
17--- a/rules.make
18+++ b/rules.make
19@@ -242,8 +242,8 @@ lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(A): $(APPLY_HACK_OBJECT) $(LIBCHIC
20 
21 # import libraries and extensions
22 
23-%.so: %.o
24-       $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_DLOADABLE_OPTIONS) $^ $(LINKER_OUTPUT_OPTION) $@ \
25+%.so: %.o $(PRIMARY_LIBCHICKEN)
26+       $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_DLOADABLE_OPTIONS) $< $(LINKER_OUTPUT_OPTION) $@ \
27          $(LINKER_LIBRARY_PREFIX)$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(LINKER_LIBRARY_SUFFIX) \
28          $(LIBRARIES)
29 
30@@ -544,9 +544,9 @@ chicken-profile.c: $(SRCDIR)chicken-profile.scm
31        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
32 chicken-install.c: $(SRCDIR)chicken-install.scm setup-download.c setup-api.c
33        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
34-chicken-uninstall.c: $(SRCDIR)chicken-uninstall.scm
35+chicken-uninstall.c: $(SRCDIR)chicken-uninstall.scm setup-api.c
36        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
37-chicken-status.c: $(SRCDIR)chicken-status.scm
38+chicken-status.c: $(SRCDIR)chicken-status.scm setup-api.c
39        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
40 csc.c: $(SRCDIR)csc.scm
41        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
42@@ -642,14 +642,17 @@ buildhead:
43 .PHONY: boot-chicken
44 
45 boot-chicken:
46+       $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) CONFIG= confclean
47        $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
48          SRCDIR=$(SRCDIR) CHICKEN=$(CHICKEN) PROGRAM_SUFFIX=-boot-stage1 STATICBUILD=1 \
49          C_COMPILER_OPTIMIZATION_OPTIONS= C_HACKED_APPLY= \
50-         confclean chicken-boot-stage1$(EXE)
51+         chicken-boot-stage1$(EXE)
52+       $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) CONFIG= touchfiles
53        $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) PREFIX=/nowhere CONFIG= \
54          SRCDIR=$(SRCDIR) CHICKEN=`pwd`/chicken-boot-stage1$(EXE) PROGRAM_SUFFIX=-boot \
55          STATICBUILD=1 C_COMPILER_OPTIMIZATION_OPTIONS= \
56-         touchfiles chicken-boot$(EXE) confclean
57+         chicken-boot$(EXE)
58+       $(MAKE) -f Makefile.$(PLATFORM) PLATFORM=$(PLATFORM) CONFIG= confclean
59 
60 .PHONY: touchfiles
61