From 1aa7ee52c6c520c2dbbdb06f1381466e9fd96294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 30 Nov 2022 17:18:42 +0100 Subject: [PATCH] build: Build gnu/packages/*.go in two passes. This works around , 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 :=. --- Makefile.am | 29 ++++++++++++++++++++++------- 1 file 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 . 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, \