[PATCH] add rule for generating fresh pot (po template) files

Matúš Kukan (via_Code_Review) gerrit at gerrit.libreoffice.org
Wed Jan 9 09:33:06 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1622

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/22/1622/1

add rule for generating fresh pot (po template) files

Moved from translations' custom makefile.

Change-Id: Ife58bfa3ee607b06617d7db80408afb453b9a10c
---
M Makefile.in
M bridges/Module_bridges.mk
M solenv/gbuild/Module.mk
3 files changed, 17 insertions(+), 4 deletions(-)



diff --git a/Makefile.in b/Makefile.in
index 9c12258..013548b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -422,7 +422,7 @@
 subsequentcheck :| $(if $(filter-out subsequentcheck,$(MAKECMDGOALS)),dev-install)
 	$(GNUMAKE) -j $(CHECK_PARALLELISM) $(GMAKE_OPTIONS) -f $(SRC_ROOT)/Makefile.post $@
 
-unitcheck slowcheck debugrun:
+unitcheck slowcheck debugrun translations:
 	$(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRC_ROOT)/Makefile.post $@
 
 endif # not clean or distclean
diff --git a/bridges/Module_bridges.mk b/bridges/Module_bridges.mk
index 118e82f..14a7255 100644
--- a/bridges/Module_bridges.mk
+++ b/bridges/Module_bridges.mk
@@ -96,7 +96,7 @@
 	) \
 ))
 
-ifneq (showmodules,$(MAKECMDGOALS))
+ifeq ($(gb_FULL_BUILD),$(true))
 ifeq ($(strip $(bridges_SELECTED_BRIDGE)),)
 $(call gb_Output_error,no bridge selected for build: bailing out)
 endif
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index fad1821..2863be8 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -89,7 +89,7 @@
 		mkdir -p $(dir $@) && \
 		touch $@)
 
-.PHONY : build all clean unitcheck slowcheck subsequentcheck dev-install showmodules
+.PHONY : build all clean unitcheck slowcheck subsequentcheck dev-install showmodules translations
 .DEFAULT_GOAL := all
 
 ifeq ($(strip $(gb_PARTIALBUILD)),)
@@ -188,6 +188,17 @@
 	$(info $(strip $(gb_Module_ALLMODULES)))
 	@true 
 
+translations : $(WORKDIR)/pot.done
+
+$(WORKDIR)/pot.done : $(foreach exec,cfgex helpex localize transex3 \
+									propex uiex ulfex xrmex treex, \
+							$(call gb_Executable_get_target_for_build,$(exec)))
+	$(call gb_Output_announce,$(subst .pot,,$(subst $(WORKDIR)/,,$@)),$(true),POT,1)
+	$(call gb_Helper_abbreviate_dirs,\
+		mkdir -p $(dir $@) && $(call gb_Helper_execute,localize) $(SRCDIR) $(dir $@)/pot \
+		&& find $(dir $@)/pot -type f -printf "%P\n" | sed -e "s/\.pot/.po/" > $(dir $@)/LIST \
+		&& touch $@)
+
 # enable if: no "-MODULE/" defined AND ["all" defined OR "MODULE/" defined]
 gb_Module__debug_enabled = \
  $(and $(if $(filter -$(1)/,$(ENABLE_DEBUGINFO_FOR)),,$(true)),\
@@ -227,7 +238,9 @@
 
 endef
 
-ifneq (showmodules,$(MAKECMDGOALS))
+gb_FULL_BUILD := $(if $(filter showmodules translations,$(MAKECMDGOALS)),$(false),$(true))
+
+ifeq ($(gb_FULL_BUILD),$(true))
 define gb_Module_add_target
 $(call gb_Module__read_targetfile,$(1),$(2),target)
 

-- 
To view, visit https://gerrit.libreoffice.org/1622
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife58bfa3ee607b06617d7db80408afb453b9a10c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Matúš Kukan <matus.kukan at gmail.com>



More information about the LibreOffice mailing list