[gimp-help-2] [make] Change some 'make' conditionals
- From: Ulf-D. Ehlert <ulfehlert src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp-help-2] [make] Change some 'make' conditionals
- Date: Mon, 15 Feb 2010 19:46:26 +0000 (UTC)
commit e84a3178aeb51451df2fdfa9974487b198dc9b33
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date: Mon Feb 15 20:15:48 2010 +0100
[make] Change some 'make' conditionals
* Remove test for "gimphelp" mode in XML2POFLAGS
(this is now the default).
* Use same syntax "if[n]eq (arg1, arg2)" for all conditionals.
* Fix some conditionals with mixed syntax.
* Fix shell command within the GIMP_PO_ROOT conditional.
Makefile.GNU | 39 ++++++++-------------------------------
Makefile.am | 10 +++++-----
2 files changed, 13 insertions(+), 36 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index 8f8abfd..cb86dce 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -139,11 +139,11 @@ COMPENDIUM = Compendium.po
VERBOSE = 1
-ifeq ("$(VERBOSE)", "0")
+ifeq ($(VERBOSE),0)
msg = @:
cmd = @
else
-ifeq ("$(VERBOSE)", "1")
+ifeq ($(VERBOSE),1)
msg = @echo
cmd = @
else
@@ -174,22 +174,12 @@ endif
#
# Hint: Don't use 'grep' for filtering-out the warning messages,
# since grep's exit status is 1 if there is no match.
-ifeq ("$(findstring gimphelp,$(XML2POFLAGS))","")
-xml2pot = ($(XML2PO) $(XML2POFLAGS) --output='-' $(1) \
- | $(MSGUNIQ) $(MSGUNIQFLAGS) \
- | $(MSGCAT) $(MSGCATFLAGS) - > "$(2)") 2>&1 \
- | $(SED) -e '/image file .* not found/d'; \
- test -s "$(2)" || rm -f "$(2)"; \
- touch -c -r $(call get_recent_file,$(1)) "$(2)" || true; \
- test -s "$(2)"
-else
xml2pot = $(XML2PO) $(XML2POFLAGS) --output='-' $(1) \
| $(MSGUNIQ) $(MSGUNIQFLAGS) \
| $(MSGCAT) $(MSGCATFLAGS) - > "$(2)"; \
test -s "$(2)" || rm -f "$(2)"; \
touch -c -r $(call get_recent_file,$(1)) "$(2)" || true; \
test -s "$(2)"
-endif
# Merge template (pot) and message catalog (po) or create a new catalog
#
@@ -231,19 +221,7 @@ pot2po = with_compendium="$(shell $(call get_compendium,$3)) \
# $2 - PO file containing translations
# $3 - translation language
# $4 - resulting (translated) XML file
-ifeq ("$(findstring gimphelp,$(XML2POFLAGS))","")
-ifneq ("$(FORMAT_XML_WITH_XMLLINT)", "1")
-po2xml = $(XML2PO) $(XML2POFLAGS) --po-file=$(2) --language=$(3) --output=$(4) $(1) 2>&1 \
- | $(SED) -e '/Warning: image file .* not found./d'; \
- rm -f .xml2po.mo
-else
-po2xml = ($(XML2PO) $(XML2POFLAGS) --po-file=$(2) --language=$(3) --output='-' $(1) \
- | $(XMLLINT) $(XMLLINTFLAGS) --format --output $(4) -) 2>&1 \
- | $(SED) -e '/Warning: image file .* not found./d'; \
- rm -f .xml2po.mo
-endif
-else
-ifneq ("$(FORMAT_XML_WITH_XMLLINT)", "1")
+ifneq ($(FORMAT_XML_WITH_XMLLINT),1)
po2xml = $(XML2PO) $(XML2POFLAGS) --po-file=$(2) --language=$(3) --output=$(4) $(1); \
rm -f .xml2po.mo
else
@@ -251,7 +229,6 @@ po2xml = ($(XML2PO) $(XML2POFLAGS) --po-file=$(2) --language=$(3) --output='-' $
| $(XMLLINT) $(XMLLINTFLAGS) --format --output $(4) -); \
rm -f .xml2po.mo
endif
-endif
#--------------------------------------------------------------#
@@ -264,7 +241,7 @@ get_recent_file = $(shell ls -t $(1) | head -n 1)
copy = $(ln_s) $(abs_srcdir)/$(1) $(2)
-ifneq ($(COMPENDIUM),"")
+ifneq ($(COMPENDIUM),)
get_compendium = \
file="$(1)"; dir=$${file%/*}; \
while true; do \
@@ -282,10 +259,10 @@ else
get_compendium =
endif
-ifneq ($(GIMP_PO_ROOT),"")
+ifneq ($(GIMP_PO_ROOT),)
use_gimp_po_files = \
for po in $(GIMP_PO_ROOT)/po*/$(1).po; do \
- test -f "$${po}" && echo '--compendium'="$${po}"; \
+ if test -f "$${po}"; then echo '--compendium'="$${po}"; fi; \
done
else
use_gimp_po_files =
@@ -729,7 +706,7 @@ draft-po/%.po: preview-po/%.po ;
#### Make PDF files: XML --> PDF ####
########################################################################
-ifneq ("$(DBLATEX)", "")
+ifneq ($(DBLATEX),)
pdf: $(foreach lang,$(LANGUAGES),pdf-$(lang)) ;
pdf-%: pdf/%/gimp.pdf ;
@@ -759,7 +736,7 @@ endif
#### Make ODF files: XML --> ODF ####
########################################################################
-ifneq ("$(DOCBOOK2ODF)","")
+ifneq ($(DOCBOOK2ODF),)
odf: $(foreach lang,$(LANGUAGES),odf-$(lang)) ;
odf-%: odf/%/gimp.odt ;
diff --git a/Makefile.am b/Makefile.am
index 57876a4..755220d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -188,11 +188,11 @@ helpdir = $(gimpdatadir)/help
# commands will be printed if (and only if) VERBOSE=2.
#
# HIDE FROM AUTOMAKE #VERBOSE ?= 1
-# HIDE FROM AUTOMAKE #ifeq ("$(VERBOSE)", "0")
+# HIDE FROM AUTOMAKE #ifeq ($(VERBOSE),0)
# HIDE FROM AUTOMAKE #msg = @:
# HIDE FROM AUTOMAKE #cmd = @
# HIDE FROM AUTOMAKE #else
-# HIDE FROM AUTOMAKE #ifeq ("$(VERBOSE)", "2")
+# HIDE FROM AUTOMAKE #ifeq ($(VERBOSE),2)
# HIDE FROM AUTOMAKE #msg = @echo
# HIDE FROM AUTOMAKE #cmd =
# HIDE FROM AUTOMAKE #else
@@ -295,7 +295,7 @@ make_target_dir = f=$(1); d=$${f%/*}; test -d $$d || $(MKDIR_P) $$d
copy = $(LN_S) $(abs_srcdir)/$(1) $(2)
-# HIDE FROM AUTOMAKE #ifneq ($(COMPENDIUM),"")
+# HIDE FROM AUTOMAKE #ifneq ($(COMPENDIUM),)
# HIDE FROM AUTOMAKE #get_compendium = \
# HIDE FROM AUTOMAKE # file="$(1)"; dir=$${file%/*}; \
# HIDE FROM AUTOMAKE # while true; do \
@@ -313,10 +313,10 @@ copy = $(LN_S) $(abs_srcdir)/$(1) $(2)
# HIDE FROM AUTOMAKE #get_compendium =
# HIDE FROM AUTOMAKE #endif
-# HIDE FROM AUTOMAKE #ifneq ($(GIMP_PO_ROOT),"")
+# HIDE FROM AUTOMAKE #ifneq ($(GIMP_PO_ROOT),)
# HIDE FROM AUTOMAKE #use_gimp_po_files = \
# HIDE FROM AUTOMAKE # for po in $(GIMP_PO_ROOT)/po*/$(1).po; do \
-# HIDE FROM AUTOMAKE # test -f "$${po}" && echo '--compendium'="$${po}"; \
+# HIDE FROM AUTOMAKE # if test -f "$${po}"; then echo '--compendium'="$${po}"; fi; \
# HIDE FROM AUTOMAKE # done
# HIDE FROM AUTOMAKE #else
# HIDE FROM AUTOMAKE #use_gimp_po_files =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]