From 0623138ffa5b066afc25547ffdeb97753cb0ee9a Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sun, 10 Oct 2021 22:07:51 +0200 Subject: maint: Factorize po xref translation. This ensures we use the same method in "make" as in "guix/self.scm". * Makefile.am: Build guix/build/po.scm. * build-aux/convert-xref.scm: New file. * doc/local.mk (xref_command): Use it. * guix/self.scm (translate-cross-references): Move it... * guix/build/po.scm: Parse comments and flags separately to find fuzzy flags. (translate-cross-references): ...here. (parse-tree->assoc): Ignore fuzzy entries. --- Makefile.am | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 635147efc1..41ec19eb89 100644 --- a/Makefile.am +++ b/Makefile.am @@ -640,6 +640,7 @@ EXTRA_DIST += \ build-aux/check-final-inputs-self-contained.scm \ build-aux/check-channel-news.scm \ build-aux/compile-as-derivation.scm \ + build-aux/convert-xref.scm \ build-aux/generate-authors.scm \ build-aux/test-driver.scm \ build-aux/update-guix-package.scm \ @@ -699,8 +700,6 @@ $(1): $(2) --completed $(3) \ $$(filter %.scm,$$^) -.PHONY: $(1) - endef # Split compilation in several steps, each of which building a subset of @@ -712,22 +711,31 @@ MODULES_CORE = guix.scm $(filter-out guix/scripts/%,$(filter guix/%,$(MODULE 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 $(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, \ $(words $(MODULES_CORE)))) +.PHONY: make-packages-go $(eval $(call guile-compilation-rule,make-system-go, \ $(MODULES_SYSTEM) make-packages-go make-core-go, \ $(words $(MODULES_CORE) $(MODULES_PACKAGES)))) +.PHONY: make-system-go $(eval $(call guile-compilation-rule,make-cli-go, \ $(MODULES_CLI) make-system-go make-packages-go make-core-go, \ $(words $(MODULES_CORE) $(MODULES_PACKAGES) $(MODULES_SYSTEM)))) +.PHONY: make-cli-go + +$(eval $(call guile-compilation-rule,guix/build/po.go, \ + $(MODULES_PO), \ + 0)) SUFFIXES = .go -- cgit 1.4.1