gimp-help-2 r2659 - trunk
- From: ulfehlert svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp-help-2 r2659 - trunk
- Date: Thu, 1 Jan 2009 11:42:14 +0000 (UTC)
Author: ulfehlert
Date: Thu Jan 1 11:42:14 2009
New Revision: 2659
URL: http://svn.gnome.org/viewvc/gimp-help-2?rev=2659&view=rev
Log:
2009-01-01 Ulf-D. Ehlert <ulfehlert svn gnome org>
* Makefile.GNU
* Makefile.am: added/fixed making localized authors.xml;
added target "validate-LANG" for validating localized xml;
changed validating so that output goes to log/LANG.xml on error
Modified:
trunk/ChangeLog
trunk/Makefile.GNU
trunk/Makefile.am
Modified: trunk/Makefile.GNU
==============================================================================
--- trunk/Makefile.GNU (original)
+++ trunk/Makefile.GNU Thu Jan 1 11:42:14 2009
@@ -65,6 +65,8 @@
xml_file_predicates = \
-name '.svn' -prune \
-o \
+ -name '$(notdir $(AUTHORS_DOCBOOK_XML))' -prune \
+ -o \
-name '*.xml' -print
dir_predicates = \
@@ -74,20 +76,21 @@
xml_dir_predicates = $(dir_predicates)
pot_dir_predicates = $(dir_predicates)
+# List of authors and contributors
+AUTHORS_STYLESHEET_XML = stylesheets/authors.xml
+# Automatically generated authors section (DocBook)
+AUTHORS_DOCBOOK_XML = $(xmldir)/preface/authors.xml
+
# Files & directories
-XML_FILES := $(shell cd $(srcdir) && find $(xmldir) $(xml_file_predicates))
XML_DIRS := $(shell cd $(srcdir) && find $(xmldir) $(dir_predicates))
+XML_FILES := $(shell cd $(srcdir) && find $(xmldir) $(xml_file_predicates)) \
+ $(AUTHORS_DOCBOOK_XML)
POT_FILES = $(XML_FILES:$(xmldir)/%.xml=$(potdir)/%.pot)
# XXX: requires that "plainhtml.xsl" has been renamed to "html.xsl"
HTML_STYLESHEETS = stylesheets/html*.xsl
-# list of authors and contributors
-AUTHORS_STYLESHEET_XML = stylesheets/authors.xml
-# automatically generated authors section (DocBook)
-AUTHORS_DOCBOOK_XML = $(xmldir)/preface/authors.xml
-
# To talk or not to talk, that is the question!
VERBOSE ?= 1
@@ -266,7 +269,7 @@
$$(cmd) if test -s $$(@:$$(xmlpodir)/$(1)/%=$$(xmldir)/%); then \
$$(call po2xml,$$(@:$$(xmlpodir)/$(1)/%=$$(xmldir)/%),$$<,$(1),$$@); \
else \
- touch $$@; \
+ touch $$(@); \
fi
# This is indirectly used as HTML prerequisite:
$$(xmlpodir)/$(1): $$($(1)_XML_FILES)
@@ -277,25 +280,22 @@
# Targets suitable for command line
xml-$(1): $$($(1)_XML_FILES)
endef
-
$(foreach LANG,$(PO_LANGS),$(eval $(call MAKE_XML_RULES,$(LANG))))
# Special case: en
-# TODO: check this
+
en_XML_FILES = $(XML_FILES:$(xmldir)/%=$(xmlpodir)/en/%)
+# TODO: check: prerequisite, preface/authors.xml
$(en_XML_FILES): $(xmlpodir)/en ;
# TODO: check: prerequisite, abs/rel link, touch
-$(xmlpodir)/en: $(xmldir)
+$(xmlpodir)/en: $(XML_FILES)
$(cmd) src_dir=$$(cd $(srcdir)/$(xmldir) && pwd); \
test -d $(xmlpodir) || $(mkdir_p) $(xmlpodir); \
test -d $@ || $(ln_s) $${src_dir} $@; \
touch $@
-
-# Targets suitable for command line
-
-# Special case: en
+# Target suitable for command line
xml-en: $(xmlpodir)/en ;
@@ -305,24 +305,30 @@
validate: validate-en ;
validate-%: xmllint-% ;
-xmllint: xmllint-en ;
+xmllint: xmllint-en ;
xmllint-%: $(logdir)/%-xmllint.log
- @echo >&2 "Validating '$*' not implemented."
+ $(cmd) test -s $< && cat $<
-xmllint-en: $(logdir)/en-xmllint.log $(xmlpodir)/en
- $(cmd) test -s $< && cat $< || echo "No errors."
-
-$(logdir)/en-xmllint.log: $(logdir) $(XML_FILES)
- $(cmd) if type $(XMLLINT) >/dev/null 2>&1; then \
- echo "*** Validating XML (en) ... "; \
- $(XMLLINT) $(XMLLINTFLAGS) --xinclude $(xmlpodir)/en/gimp.xml \
+define MAKE_XMLLINT_RULES
+$$(logdir)/$(1)-xmllint.log: $$(logdir) $$($(1)_XML_FILES)
+ $$(cmd) if type $$(XMLLINT) >/dev/null 2>&1; then \
+ echo "*** Validating XML ($(1)) ... "; \
+ $$(XMLLINT) $$(XMLLINTFLAGS) --xinclude $$(xmlpodir)/$(1)/gimp.xml \
| sed -e 's,xmlns:xi="http://www.w3.org/2001/XInclude",,' \
- | $(XMLLINT) $(XMLLINTFLAGS) --nonet --valid --noout - 2>$@ \
- || true; \
+ | $$(XMLLINT) $$(XMLLINTFLAGS) --nonet --valid \
+ --output $$(logdir)/$(1).xml - 2>$$(@); \
+ if test -s $$(@); then \
+ echo "(You will find log and xml files in $$(logdir)/.)"; \
+ else \
+ echo "No errors."; \
+ rm -f $$(logdir)/$(1).xml; \
+ fi >> $$(@); \
else \
- echo "*** Validating 'en' skipped: 'xmllint' not found."; \
+ echo >&2 "*** Validating '$(1)' skipped: 'xmllint' not found."; \
fi
+endef
+$(foreach LANG,$(LANGUAGES),$(eval $(call MAKE_XMLLINT_RULES,$(LANG))))
$(logdir):
$(cmd) mkdir $@ && test -w $@
@@ -464,7 +470,7 @@
$<
$(xmlpodir)/%/gimp-alldocs.xml: $(xmlpodir)/%/gimp.xml
- $(XMLLINT) $(XMLLINTFLAGS) --xinclude --output $@ $<
+ $(cmd) $(XMLLINT) $(XMLLINTFLAGS) --xinclude --output $@ $<
else
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Thu Jan 1 11:42:14 2009
@@ -91,6 +91,11 @@
-o \
-type d -print
+# list of authors and contributors
+AUTHORS_STYLESHEET_XML = stylesheets/authors.xml
+# automatically generated authors section (DocBook)
+AUTHORS_DOCBOOK_XML = $(xmldir)/preface/authors.xml
+
# lists of source (XML) files and source directories
XML_DIRS = $(shell cd $(srcdir) && find $(xmldir) $(dir_predicates))
XML_FILES = $(shell cd $(srcdir) && find $(xmldir) $(src_find_predicates)) \
@@ -128,11 +133,6 @@
$(XML_FILES) \
$(XSL_FILES)
-# list of authors and contributors
-AUTHORS_STYLESHEET_XML = stylesheets/authors.xml
-# automatically generated authors section (DocBook)
-AUTHORS_DOCBOOK_XML = $(xmldir)/preface/authors.xml
-
# TODO?: rename "plainhtml.xsl" to "html.xsl" and use ...
# ... HTML_STYLESHEETS = stylesheets/html*.xsl
HTML_STYLESHEETS = stylesheets/plainhtml.xsl stylesheets/htmlalternate.xsl
@@ -187,7 +187,7 @@
AUTHORS: $(AUTHORS_STYLESHEET_XML) stylesheets/authors_text.xsl $(AUTHORS_DOCBOOK_XML)
$(msg) "[DOC] $@"
$(cmd) $(XSLTPROC) \
- $(XSLTFLAGS) \
+ $(XSLTFLAGS) $(XSLTEXTRAFLAGS) \
$(srcdir)/stylesheets/authors_text.xsl \
$< \
> $@
@@ -196,7 +196,7 @@
$(msg) "[SRC] $@"
$(cmd) f=$@; d=$${f%/*}; test -d $$d || $(mkdir_p) $$d
$(cmd) $(XSLTPROC) \
- $(XSLTFLAGS) \
+ $(XSLTFLAGS) $(XSLTEXTRAFLAGS) \
$(srcdir)/stylesheets/authors_docbook.xsl \
$< \
> $@
@@ -322,29 +322,25 @@
# HIDE FROM AUTOMAKE ## This is indirectly used as HTML prerequisite:
# HIDE FROM AUTOMAKE #$$(xmlpodir)/$(1): $$($(1)_XML_FILES)
# HIDE FROM AUTOMAKE # $$(cmd) touch $$(xmlpodir)/$(1)
-# HIDE FROM AUTOMAKE ## Debugging
-# HIDE FROM AUTOMAKE #list-xmlfiles-$(1) list-xml-files-$(1) list-xml-$(1):
-# HIDE FROM AUTOMAKE # @echo $$($(1)_XML_FILES)
# HIDE FROM AUTOMAKE ## Targets suitable for command line
# HIDE FROM AUTOMAKE #xml-$(1): $$($(1)_XML_FILES)
# HIDE FROM AUTOMAKE #endef
-
$(foreach LANG,$(PO_LANGS),$(eval $(call MAKE_XML_RULES,$(LANG))))
# Special case: en
+
# HIDE FROM AUTOMAKE #en_XML_FILES = $(XML_FILES:$(xmldir)/%=$(xmlpodir)/en/%)
-# TODO: check this
+# TODO: check: prerequisite, preface/authors.xml
$(en_XML_FILES): $(xmlpodir)/en ;
-# TODO: make relative link rather than absolute link(?)
+# TODO: check: prerequisite, abs/rel link, touch
$(xmlpodir)/en: $(XML_FILES)
$(cmd) src_dir=$$(cd $(srcdir)/$(xmldir) && pwd); \
- poxml_dir=$(xmlpodir); \
- test -d $${poxml_dir} || $(mkdir_p) $${poxml_dir}; \
- test -d $${poxml_dir}/en || $(LN_S) $${src_dir} $${poxml_dir}/en; \
+ test -d $(xmlpodir) || $(mkdir_p) $(xmlpodir); \
+ test -d $@ || $(LN_S) $${src_dir} $@; \
touch $@
-# Special case: en
+# Target suitable for command line
xml-en: $(xmlpodir)/en ;
@@ -354,24 +350,30 @@
validate: validate-en ;
validate-%: xmllint-% ;
-xmllint: xmllint-en ;
+xmllint: xmllint-en ;
xmllint-%: $(logdir)/%-xmllint.log
- @echo >&2 "Validating '$*' not implemented."
+ $(cmd) test -s $< && cat $<
-xmllint-en: $(logdir)/en-xmllint.log $(xmlpodir)/en
- $(cmd) test -s $< && cat $< || echo "No errors."
-
-$(logdir)/en-xmllint.log: $(logdir) $(XML_FILES)
- $(cmd) if type $(XMLLINT) >/dev/null 2>&1; then \
- echo "*** Validating XML (en) ... "; \
- $(XMLLINT) $(XMLLINTFLAGS) --xinclude $(xmlpodir)/en/gimp.xml \
- | sed -e 's,xmlns:xi="http://www.w3.org/2001/XInclude",,' \
- | $(XMLLINT) $(XMLLINTFLAGS) --nonet --valid --noout - 2>$@ \
- || true; \
- else \
- echo "*** Validating 'en' skipped: 'xmllint' not found."; \
- fi
+# HIDE FROM AUTOMAKE #define MAKE_XMLLINT_RULES
+# HIDE FROM AUTOMAKE #$$(logdir)/$(1)-xmllint.log: $$(logdir) $$($(1)_XML_FILES)
+# HIDE FROM AUTOMAKE # $$(cmd) if type $$(XMLLINT) >/dev/null 2>&1; then \
+# HIDE FROM AUTOMAKE # echo "*** Validating XML ($(1)) ... "; \
+# HIDE FROM AUTOMAKE # $$(XMLLINT) $$(XMLLINTFLAGS) --xinclude $$(xmlpodir)/$(1)/gimp.xml \
+# HIDE FROM AUTOMAKE # | sed -e 's,xmlns:xi="http://www.w3.org/2001/XInclude",,' \
+# HIDE FROM AUTOMAKE # | $$(XMLLINT) $$(XMLLINTFLAGS) --nonet --valid \
+# HIDE FROM AUTOMAKE # --output $$(logdir)/$(1).xml - 2>$$(@); \
+# HIDE FROM AUTOMAKE # if test -s $$(@); then \
+# HIDE FROM AUTOMAKE # echo "(You will find log and xml files in $$(logdir)/.)"; \
+# HIDE FROM AUTOMAKE # else \
+# HIDE FROM AUTOMAKE # echo "No errors."; \
+# HIDE FROM AUTOMAKE # rm -f $$(logdir)/$(1).xml; \
+# HIDE FROM AUTOMAKE # fi >> $$(@); \
+# HIDE FROM AUTOMAKE # else \
+# HIDE FROM AUTOMAKE # echo >&2 "*** Validating '$(1)' skipped: 'xmllint' not found."; \
+# HIDE FROM AUTOMAKE # fi
+# HIDE FROM AUTOMAKE #endef
+$(foreach LANG,$(LANGUAGES),$(eval $(call MAKE_XMLLINT_RULES,$(LANG))))
$(logdir):
$(cmd) mkdir $@ && test -w $@
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]