[gimp-help-2] [make] Update help



commit 32c24588f8ededa58aa2a81a00a43f737a849677
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date:   Mon Jan 18 12:18:17 2010 +0100

    [make] Update help
    
    * Add target 'help' to Makefile.am.
    * Add make variable QUICK_TARGETS listing simple targets like "help".
    * Minor fix to help sed script (strip leading spaces).
    * Update help text.

 Makefile.GNU |   17 +++++++++--------
 Makefile.am  |   45 ++++++++++++++++++++++++++++++++++++++++-----
 make.help    |   38 +++++++++++++++++++++-----------------
 3 files changed, 70 insertions(+), 30 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index e6ff683..64180df 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -4,9 +4,7 @@
 
 # The GIMP manual languages
 ALL_LINGUAS = de en es fr it ja ko nl nn pl ru sv zh_CN
-LANGUAGES = $(if $(LINGUAS), \
-              $(filter $(ALL_LINGUAS),$(LINGUAS)), \
-	      $(ALL_LINGUAS))
+LANGUAGES = $(if $(LINGUAS),$(filter $(ALL_LINGUAS),$(LINGUAS)),$(ALL_LINGUAS))
 ifneq ($(DOC_LINGUAS),)
 $(warning Do not set the internal variable DOC_LINGUAS)
 endif
@@ -94,8 +92,11 @@ AUTHORS_DOCBOOK_STYLESHEETS = \
 	stylesheets/authors_docbook.xsl \
 	stylesheets/authors_common.xsl
 
+# Targets which don't require source file list
+QUICK_TARGETS = help clean
+
 # Files & directories
-ifeq ($(filter help clean,$(MAKECMDGOALS)),)
+ifeq ($(filter $(QUICK_TARGETS),$(MAKECMDGOALS)),)
 SRC_DIRS  := $(shell cd $(srcdir) && $(find_l) src/ $(src_dir_predicates))
 SRC_FILES := $(shell cd $(srcdir) && $(find_l) src/ $(src_file_predicates)) \
              $(AUTHORS_DOCBOOK_XML)
@@ -297,9 +298,9 @@ help: make.help
 	    -e '### print if no "make" variable found ###' \
 	    -e '/@/!b' \
 	    -e '### replace "make" variables ###' \
-	    -e 's/@LANGUAGES@/@$(LANGUAGES)@/' \
-	    -e 's/@LINGUAS@/@$(LINGUAS)@/' \
-	    -e 's/@ALL_LINGUAS@/@$(ALL_LINGUAS)@/' \
+	    -e 's/@LANGUAGES@/@$(strip $(LANGUAGES))@/' \
+	    -e 's/@LINGUAS@/@$(strip $(LINGUAS))@/' \
+	    -e 's/@ALL_LINGUAS@/@$(strip $(ALL_LINGUAS))@/' \
 	    -e '### add commas ###' \
 	    -e 'tloop' \
 	    -e ':loop' \
@@ -427,7 +428,7 @@ force-po/%:
 ####            Generate XML prerequisites                          ####
 ########################################################################
 
-ifeq ($(filter help clean,$(MAKECMDGOALS)),)
+ifeq ($(filter $(QUICK_TARGETS),$(MAKECMDGOALS)),)
 include $(foreach LANG,$(PO_LANGS),xml/$(LANG)/.deps.mk)
 endif
 
diff --git a/Makefile.am b/Makefile.am
index ce82f83..fc834b1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,9 +9,7 @@ LAST_RELEASE_TAG = GIMP_HELP_2_4_2
 ####            The GIMP manual languages                           ####
 ########################################################################
 
-LANGUAGES = $(if $(LINGUAS), \
-              $(filter $(ALL_LINGUAS),$(LINGUAS)), \
-	      $(ALL_LINGUAS))
+LANGUAGES = $(if $(LINGUAS),$(filter $(ALL_LINGUAS),$(LINGUAS)),$(ALL_LINGUAS))
 # HIDE FROM AUTOMAKE #ifneq ($(DOC_LINGUAS),)
 # HIDE FROM AUTOMAKE #$(warning Do not set the internal variable DOC_LINGUAS)
 # HIDE FROM AUTOMAKE #endif
@@ -102,8 +100,11 @@ AUTHORS_DOCBOOK_STYLESHEETS = \
 	stylesheets/authors_docbook.xsl \
 	stylesheets/authors_common.xsl
 
+# Targets which don't require source file list
+QUICK_TARGETS = help clean
+
 # lists of source (XML) files and source directories
-# HIDE FROM AUTOMAKE #ifeq ($(filter help clean,$(MAKECMDGOALS)),)
+# HIDE FROM AUTOMAKE #ifeq ($(filter $(QUICK_TARGETS),$(MAKECMDGOALS)),)
 # HIDE FROM AUTOMAKE #SRC_DIRS  := $(shell cd $(srcdir) && $(find_l) src/ $(src_dir_predicates))
 # HIDE FROM AUTOMAKE #SRC_FILES := $(shell cd $(srcdir) && $(find_l) src/ $(src_file_predicates))
 # HIDE FROM AUTOMAKE #else
@@ -322,6 +323,40 @@ copy = $(LN_S) $(abs_srcdir)/$(1) $(2)
 
 
 ########################################################################
+####            Help!!!                                             ####
+########################################################################
+
+make.help:
+	@echo >&2 'ERROR: cannot find the help file "$@"!'
+	@exit 66
+
+help: make.help
+	$(cmd) $(SED) \
+	    -e '### skip comments ###' \
+	    -e '/^#/d' \
+	    -e '### print if no "make" variable found ###' \
+	    -e '/@/!b' \
+	    -e '### replace "make" variables ###' \
+	    -e 's/@LANGUAGES@/@$(strip $(LANGUAGES))@/' \
+	    -e 's/@LINGUAS@/@$(strip $(LINGUAS))@/' \
+	    -e 's/@ALL_LINGUAS@/@$(strip $(ALL_LINGUAS))@/' \
+	    -e '### add commas ###' \
+	    -e 'tloop' \
+	    -e ':loop' \
+	    -e '    ### mark value of variable (@@...@@) ###' \
+	    -e '    s/@\([^ ]*\)@/@@\1@@/' \
+	    -e '    twhile' \
+	    -e '    :while' \
+	    -e '        s/\(@@[^,@]*\) \([^ ]*@@\)/\1, \2/' \
+	    -e '    twhile' \
+	    -e '    s/@@\([^ ]*\)@@/\1/' \
+	    -e 'tloop' \
+	$<
+
+.PHONY: help
+
+
+########################################################################
 ####            Make AUTHORS file                                   ####
 ########################################################################
 
@@ -452,7 +487,7 @@ po-todo-%: po-%
 ####            Generate XML prerequisites                          ####
 ########################################################################
 
-# HIDE FROM AUTOMAKE #ifeq ($(filter help clean,$(MAKECMDGOALS)),)
+# HIDE FROM AUTOMAKE #ifeq ($(filter $(QUICK_TARGETS),$(MAKECMDGOALS)),)
 # HIDE FROM AUTOMAKE #include $(foreach LANG,$(PO_LANGS),xml/$(LANG)/.deps.mk)
 # HIDE FROM AUTOMAKE #endif
 
diff --git a/make.help b/make.help
index 502f8a5..f897cfc 100644
--- a/make.help
+++ b/make.help
@@ -10,53 +10,57 @@
 #
 
 Default (main) targets:
-  all              Create/update AUTHORS file and HTML
-                     (same as "make [..] html AUTHORS" or just "make [..]")
-  html             Create/update HTML for all languages
+  all              Create/update HTML manual (and AUTHORS file)
+                     (equivalent to "make [..] html AUTHORS" or "make [..]")
+  html             Create/update HTML manual for all languages
                      (@LANGUAGES@)
   AUTHORS          Create/update AUTHORS file
 
-GIMP-manual targets:
+Language-specific targets for making the GIMP-manual:
   html-LANG        Build HTML for language LANG (implies xml-LANG)
   pdf-LANG         Build  PDF for language LANG (implies xml-LANG)
   odf-LANG         Build  ODF for language LANG (implies xml-LANG)
-#    (LANG is one of @LANGUAGES@)
 
   Omitting LANG (e.g."make [..] html") is equivalent to making target
   for all languages: @LANGUAGES@
 
   WARNING: Making HTML (or PDF, ODF, XML) will automatically update
   -------  po files if necessary. This may lead to unintended commits
-           when working directly on an SVN sandbox.
+           when working directly on a GIT sandbox.
 
 Internal targets (intermediate stages):
   pot              Create/update POT files
-  po-LANG          Create/update  PO files for language LANG (implies pot)
+  po-LANG          Create/update PO files for language LANG (implies pot)
   xml-LANG         Create/update XML files for language LANG (implies po-LANG)
-#    (LANG is one of @LANGUAGES@)
 
 Special (helper) targets for documenters and translators:
   status-LANG      Show translation progress for language LANG
-  update-po/LANG/path/to/pofile.po
-                   Force re-making of pofile (useful if you updated
-                   the Compendium.po)
-  preview-xml/LANG/path/to/xmlfile.xml
-                   Make a single draft HTML file
+  po/LANG/path/to/file.po
+                   Force re-making of po file
+  pot/path/to/file.pot
+                   Force re-making of pot file
+  preview-xml/LANG/path/to/file.xml
+                   Make a single draft HTML file for language "LANG"
+  preview-src/path/to/file.xml
+                   Make single draft HTML files for all languages
 
 Checks:
   validate-LANG    Validate XML for language LANG via 'xmllint'
   validate         Same as "validate-en"
   check-images-LANG
                    Find broken image references and orphaned image files
-                   for language LANG
+                   for language LANG (and for English images ("C"))
   check-images     Same as "check-images-en"
 
 Special (helper) targets for build-system development:
   dot              Create a visualized version of the Makefile dependencies
-                   (this is not up-to-date!)
+                   (this may be not up-to-date!)
 
 Make variables (can be overriden at command-line):
-  LANGUAGES="..."  Space-separated list of manual languages (e.g. "en de fr")
+  LINGUAS="..."    Space-separated list of manual languages (e.g. "en de fr"),
+                   restricted to ALL_LINGUAS= ALL_LINGUAS@
+  LANGUAGES="..."  Space-separated list of manual languages (e.g. "en de fr"),
+                   overriding ALL_LINGUAS
   VERBOSE=0|1|2    Controls the amount of output messages:
-                     1 = "beauty" (default), 2 = all, 0 = silent (more or less)
+                     1 = moderate (default), 2 = all, 0 = nearly silent
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]