summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-11-30 17:18:42 +0100
committerLudovic Courtès <ludo@gnu.org>2022-11-30 19:58:33 +0100
commit1aa7ee52c6c520c2dbbdb06f1381466e9fd96294 (patch)
treebd97193e0644ae17c4a9da1490ba350922402559
parent1bc9d5222f9053fd0ace7b92df0ef9548707cf41 (diff)
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.am29
1 files changed, 22 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am
index c3af23b68e7..8aa3fe9cec4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -751,20 +751,35 @@ endef
751# in <https://issues.guix.gnu.org/48963>. Each 'eval' call below creates a 751# in <https://issues.guix.gnu.org/48963>. Each 'eval' call below creates a
752# 'make-*-go' phony target that builds the corresponding subset. 752# 'make-*-go' phony target that builds the corresponding subset.
753 753
754MODULES_CORE = guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULES))) 754first_half := \
755MODULES_PACKAGES = $(filter gnu/packages/%,$(MODULES)) 755 gnu/packages/a% gnu/packages/b% gnu/packages/c% gnu/packages/d% \
756MODULES_SYSTEM = gnu.scm $(filter-out gnu/packages/%,$(filter gnu/%,$(MODULES))) 756 gnu/packages/e% gnu/packages/f% gnu/packages/g% gnu/packages/h% \
757MODULES_CLI = $(filter guix/scripts/%,$(MODULES)) 757 gnu/packages/i% gnu/packages/j% gnu/packages/k% gnu/packages/l%
758MODULES_PO = guix/build/po.scm 758
759MODULES_CORE := guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULES)))
760MODULES_PACKAGES1 := $(filter $(first_half),$(MODULES))
761MODULES_PACKAGES2 := $(filter-out $(first_half),$(filter gnu/packages/%,$(MODULES)))
762MODULES_PACKAGES := $(MODULES_PACKAGES1) $(MODULES_PACKAGES2)
763MODULES_SYSTEM := gnu.scm $(filter-out gnu/packages/%,$(filter gnu/%,$(MODULES)))
764MODULES_CLI := $(filter guix/scripts/%,$(MODULES))
765MODULES_PO := guix/build/po.scm
759 766
760$(eval $(call guile-compilation-rule,make-core-go, \ 767$(eval $(call guile-compilation-rule,make-core-go, \
761 $(MODULES_CORE) guix/config.scm $(dist_noinst_DATA), \ 768 $(MODULES_CORE) guix/config.scm $(dist_noinst_DATA), \
762 0)) 769 0))
763.PHONY: make-core-go 770.PHONY: make-core-go
764 771
765$(eval $(call guile-compilation-rule,make-packages-go, \ 772$(eval $(call guile-compilation-rule,make-packages1-go, \
766 $(MODULES_PACKAGES) make-core-go, \ 773 $(MODULES_PACKAGES1) make-core-go, \
767 $(words $(MODULES_CORE)))) 774 $(words $(MODULES_CORE))))
775.PHONY: make-packages1-go
776
777$(eval $(call guile-compilation-rule,make-packages2-go, \
778 $(MODULES_PACKAGES2) make-core-go make-packages1-go, \
779 $(words $(MODULES_CORE) $(MODULES_PACKAGES1))))
780.PHONY: make-packages2-go
781
782make-packages-go: make-packages1-go make-packages2-go
768.PHONY: make-packages-go 783.PHONY: make-packages-go
769 784
770$(eval $(call guile-compilation-rule,make-system-go, \ 785$(eval $(call guile-compilation-rule,make-system-go, \