diff options
author | Ludovic Courtès <ludo@gnu.org> | 2022-11-30 17:18:42 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-11-30 19:58:33 +0100 |
commit | 1aa7ee52c6c520c2dbbdb06f1381466e9fd96294 (patch) | |
tree | bd97193e0644ae17c4a9da1490ba350922402559 | |
parent | 1bc9d5222f9053fd0ace7b92df0ef9548707cf41 (diff) | |
download | guix-1aa7ee52c6c520c2dbbdb06f1381466e9fd96294.tar.gz |
build: Build gnu/packages/*.go in two passes.
This works around <https://issues.guix.gnu.org/59717>, whereby heap usage would go beyond what's reasonable, preventing compilation of the 'guix' package on armhf-linux. This is a followup to ef82ba9dd94369926eb13325d5e7da4306d23dd7. * Makefile.am (MODULES_PACKAGES1, MODULES_PACKAGES): New variables. (MODULES_PACKAGES): Define in terms of them and use :=. (MODULES_CORE, MODULES_SYSTEM, MODULES_CLI, MODULES_PO): Define with :=.
-rw-r--r-- | Makefile.am | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index c3af23b68e..8aa3fe9cec 100644 --- a/Makefile.am +++ b/Makefile.am @@ -751,20 +751,35 @@ endef # in <https://issues.guix.gnu.org/48963>. Each 'eval' call below creates a # 'make-*-go' phony target that builds the corresponding subset. -MODULES_CORE = guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULES))) -MODULES_PACKAGES = $(filter gnu/packages/%,$(MODULES)) -MODULES_SYSTEM = gnu.scm $(filter-out gnu/packages/%,$(filter gnu/%,$(MODULES))) -MODULES_CLI = $(filter guix/scripts/%,$(MODULES)) -MODULES_PO = guix/build/po.scm +first_half := \ + gnu/packages/a% gnu/packages/b% gnu/packages/c% gnu/packages/d% \ + gnu/packages/e% gnu/packages/f% gnu/packages/g% gnu/packages/h% \ + gnu/packages/i% gnu/packages/j% gnu/packages/k% gnu/packages/l% + +MODULES_CORE := guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULES))) +MODULES_PACKAGES1 := $(filter $(first_half),$(MODULES)) +MODULES_PACKAGES2 := $(filter-out $(first_half),$(filter gnu/packages/%,$(MODULES))) +MODULES_PACKAGES := $(MODULES_PACKAGES1) $(MODULES_PACKAGES2) +MODULES_SYSTEM := gnu.scm $(filter-out gnu/packages/%,$(filter gnu/%,$(MODULES))) +MODULES_CLI := $(filter guix/scripts/%,$(MODULES)) +MODULES_PO := guix/build/po.scm $(eval $(call guile-compilation-rule,make-core-go, \ $(MODULES_CORE) guix/config.scm $(dist_noinst_DATA), \ 0)) .PHONY: make-core-go -$(eval $(call guile-compilation-rule,make-packages-go, \ - $(MODULES_PACKAGES) make-core-go, \ +$(eval $(call guile-compilation-rule,make-packages1-go, \ + $(MODULES_PACKAGES1) make-core-go, \ $(words $(MODULES_CORE)))) +.PHONY: make-packages1-go + +$(eval $(call guile-compilation-rule,make-packages2-go, \ + $(MODULES_PACKAGES2) make-core-go make-packages1-go, \ + $(words $(MODULES_CORE) $(MODULES_PACKAGES1)))) +.PHONY: make-packages2-go + +make-packages-go: make-packages1-go make-packages2-go .PHONY: make-packages-go $(eval $(call guile-compilation-rule,make-system-go, \ |