[gimp-help-2] [make] Fix Makefile problem with make v3.82
- From: Ulf-D. Ehlert <ulfehlert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-help-2] [make] Fix Makefile problem with make v3.82
- Date: Wed, 22 Dec 2010 12:35:32 +0000 (UTC)
commit 9790a3787067697db454d244a60042fe7ed2c469
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date: Tue Dec 21 21:04:03 2010 +0100
[make] Fix Makefile problem with make v3.82
* make v3.82 (and make v3.80) didn't handle pattern rules containing
wildcards (see #637505). So the rules for making POT files are changed,
now using GNU make's "Secondary Expansion" feature.
(bugfix by Miroslav Å ulc <fordfrog fordfrog name>)
* Fix "make pot/gimp.pot".
(bugfix by Miroslav Å ulc <fordfrog fordfrog name>)
* Fix (and use) image prerequisites for pot files (if an image is
changed, the pot file is updated).
Makefile.GNU | 8 ++++++--
Makefile.am | 16 ++++++++++------
2 files changed, 16 insertions(+), 8 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index 28f17f5..102c29e 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -354,11 +354,15 @@ POT_FILES = $(patsubst src/%,pot/%.pot,$(filter-out src src/,$(SRC_DIRS)))
# Special case: src/*.xml --> pot/gimp.pot
POT_FILES += pot/gimp.pot
+# XXX: Secondary Expansion of the following two rules is required because
+# "pot/%.pot: $(srcdir)/src/%/*.xml" didn't work with make v3.82
+# (cf. bug #637505).
+.SECONDEXPANSION:
# General case
ifeq ($(filter pot/%.pot po/%.po,$(MAKECMDGOALS)),)
-pot/%.pot: src/%/*.xml $(wildcard images/C/%/*.*)
+pot/%.pot: src/$$*/*.xml $$(wildcard images/C/$$*/*.*)
else
-pot/%.pot: src/%/*.xml FORCE
+pot/%.pot: src/$$*/*.xml FORCE
endif
$(cmd) $(call make_target_dir,$@)
$(msg) "[POT] $@"
diff --git a/Makefile.am b/Makefile.am
index 7b83db1..fe4d167 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -411,15 +411,19 @@ MAINTAINERS: gimp-help-2.doap $(DOAP_STYLESHEET)
########################################################################
# src/path/to/file/*.xml --> pot/path/to/file.pot
-POT_FILES = $(patsubst src/%,pot/%.pot,$(filter-out src src/,$(SRC_DIRS)))
+# HIDE FROM AUTOMAKE #POT_FILES = $(patsubst src/%,pot/%.pot,$(filter-out src src/,$(SRC_DIRS)))
# Special case: src/*.xml --> pot/gimp.pot
-POT_FILES += pot/gimp.pot
+# HIDE FROM AUTOMAKE #POT_FILES += pot/gimp.pot
+# XXX: Secondary Expansion of the following two rules is required because
+# "pot/%.pot: $(srcdir)/src/%/*.xml" didn't work with make v3.82
+# (cf. bug #637505).
+# HIDE FROM AUTOMAKE #.SECONDEXPANSION:
# General case
# HIDE FROM AUTOMAKE #ifeq ($(filter pot/%.pot,$(MAKECMDGOALS)),)
-# HIDE FROM AUTOMAKE #pot/%.pot: $(srcdir)/src/%/*.xml
+# HIDE FROM AUTOMAKE #pot/%.pot: $(srcdir)/src/$$*/*.xml $$(wildcard images/C/$$*/*.*)
# HIDE FROM AUTOMAKE #else
-# HIDE FROM AUTOMAKE #pot/%.pot: $(srcdir)/src/%/*.xml FORCE
+# HIDE FROM AUTOMAKE #pot/%.pot: $(srcdir)/src/$$*/*.xml FORCE
# HIDE FROM AUTOMAKE #endif
# HIDE FROM AUTOMAKE # $(cmd) $(call make_target_dir,$@)
# HIDE FROM AUTOMAKE # $(msg) "[POT] $@"
@@ -432,10 +436,10 @@ POT_FILES += pot/gimp.pot
# HIDE FROM AUTOMAKE #endif
# HIDE FROM AUTOMAKE # $(cmd) $(call make_target_dir,$@)
# HIDE FROM AUTOMAKE # $(msg) "[POT] $@"
-# HIDE FROM AUTOMAKE # $(cmd) $(call xml2pot,$^,$@)
+# HIDE FROM AUTOMAKE # $(cmd) $(call xml2pot,$(filter-out FORCE,$^),$@)
# Special case: pot file for the authors DocBook file
# requires an additional prerequisite
-AUTHORS_POT = $(AUTHORS_DOCBOOK_XML:src/%/$(AUTHORS_DOCBOOK_FILENAME)=pot/%.pot)
+# HIDE FROM AUTOMAKE #AUTHORS_POT = $(AUTHORS_DOCBOOK_XML:src/%/$(AUTHORS_DOCBOOK_FILENAME)=pot/%.pot)
# HIDE FROM AUTOMAKE #ifeq ($(filter pot/%.pot,$(MAKECMDGOALS)),)
# HIDE FROM AUTOMAKE #$(AUTHORS_POT): $(AUTHORS_DOCBOOK_XML) $(wildcard $(AUTHORS_DOCBOOK_DIRNAME)*.xml)
# HIDE FROM AUTOMAKE #else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]