[gimp-help-2] [make] Fix making images
- From: Ulf-D. Ehlert <ulfehlert src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp-help-2] [make] Fix making images
- Date: Sun, 7 Feb 2010 19:36:03 +0000 (UTC)
commit 3b4e10e2fcafb89bba0c20bd401bd6b816152cd9
Author: Ulf-D. Ehlert <ulfehlert svn gnome org>
Date: Sun Feb 7 17:56:34 2010 +0100
[make] Fix making images
Remove 'html-images-%' target which conflicts with 'html-%' (and which
isn't realyy needed);
also, use xml images directory (again) as real prerequisite for making PDF.
Makefile.GNU | 25 ++++++++++---------------
Makefile.am | 20 ++++++++++----------
2 files changed, 20 insertions(+), 25 deletions(-)
---
diff --git a/Makefile.GNU b/Makefile.GNU
index d3a010f..8f8abfd 100644
--- a/Makefile.GNU
+++ b/Makefile.GNU
@@ -104,7 +104,7 @@ AUTHORS_DOCBOOK_STYLESHEETS = \
stylesheets/authors_common.xsl
# Targets which don't require source file list
-QUICK_TARGETS = help clean dot
+QUICK_TARGETS = help clean dot image-%
# Files & directories
ifeq ($(filter $(QUICK_TARGETS),$(MAKECMDGOALS)),)
@@ -570,15 +570,12 @@ cleanup-xml-%:
test -e src/$${xmlfile#xml/$*/} || rm -vf $${xmlfile}; \
done
-# Target suitable for command line
-images-%: xml-images-% html-images-% ;
-xml-images-%: xml/%/images ;
-
-# Main commandline target
+# Command-line targets
xml: $(foreach LANG,$(LANGUAGES),xml-$(LANG)) ;
+images-%: xml/%/images html/%/images ;
.PRECIOUS: xml/%/images
-.PHONY: xml xml-% xml-images-% images-%
+.PHONY: xml xml-% images-%
########################################################################
@@ -665,24 +662,22 @@ html/%/images: xml/%/images
$(cmd) test -d html/$* || $(mkdir_p) html/$*
$(cmd) test -e $@ || $(ln_s) ../../$< $@
else
-html/%/images: FORCE
+html/%/images: $(IMAGE_PREREQ)
$(cmd) if test -h $@; then rm -f $@; fi
$(cmd) test -d $@ && rm -rf $@/* || $(mkdir_p) $@
- $(cmd) $(echo_n) "Copying images ($*) ..."
+ $(cmd) $(echo_n) "Copying HTML images ($*) ..."
$(cmd) perl tools/make_image_links.pl -v --mode=hardlink,copy \
images/{common,C} $@
+ $(cmd) touch $@
endif
-# Target suitable for command line
-html-images-%: html/%/images ;
-
.PRECIOUS: \
html/%/index.html \
html/%/gimp-help.xml \
html/%/gimp-xrefs.xml \
html/%/images
-.PHONY: html html-% html-images-% index index-%
+.PHONY: html html-% index index-%
########################################################################
@@ -739,8 +734,8 @@ ifneq ("$(DBLATEX)", "")
pdf: $(foreach lang,$(LANGUAGES),pdf-$(lang)) ;
pdf-%: pdf/%/gimp.pdf ;
-# TODO: images (--fig-path option?); prerequisites
-pdf/%/gimp.pdf: xml/% stylesheets/plainprint.xsl | xml/%/images
+# TODO: check prerequisites, e.g. images (--fig-path option?)
+pdf/%/gimp.pdf: xml/% stylesheets/plainprint.xsl xml/%/images
$(cmd) if test -f pdf/%.pdf; then rm -f pdf/%.pdf; fi
$(cmd) test -d pdf/$* || $(mkdir_p) pdf/$*
$(msg) "*** Making PDF ($*) ..."
diff --git a/Makefile.am b/Makefile.am
index e6eef90..66d8d9b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -100,7 +100,7 @@ AUTHORS_DOCBOOK_STYLESHEETS = \
stylesheets/authors_common.xsl
# Targets which don't require source file list
-QUICK_TARGETS = help clean dot
+QUICK_TARGETS = help clean dot image-%
# lists of source (XML) files and source directories
# HIDE FROM AUTOMAKE #ifeq ($(filter $(QUICK_TARGETS),$(MAKECMDGOALS)),)
@@ -598,6 +598,7 @@ else
$(cmd) perl $(srcdir)/tools/make_image_links.pl -v \
$(srcdir)/images/{common,C} $@
endif
+ $(cmd) touch $@
# Remove left over xml files
cleanup-xml-%:
@@ -608,14 +609,13 @@ cleanup-xml-%:
done
# Target suitable for command line
-images-%: xml-images-% html-images-% ;
-xml-images-%: xml/%/images ;
+images-%: xml/%/images html/%/images ;
# Main commandline target
xml: $(foreach LANG,$(LANGUAGES),xml-$(LANG)) ;
.PRECIOUS: xml/%/images
-.PHONY: xml xml-% xml-images-%
+.PHONY: xml xml-%
########################################################################
@@ -698,16 +698,16 @@ html/%/gimp-xrefs.xml: html/%/index.html
$(cmd) touch $@
### HTML images ###
-html-images-%: html/%/images ;
-
if CYGWIN
# Cygwin
-html/%/images: FORCE
+html/%/images: $(IMAGE_PREREQ)
$(cmd) if test -h $@; then rm -f $@; fi
$(cmd) test -d $@ && rm -rf $@/* || $(MKDIR_P) $@
+ $(cmd) $(echo_n) "Copying HTML images ($*) ..."
$(cmd) perl $(srcdir)/tools/make_image_links.pl -v \
--mode=hardlink,copy \
$(srcdir)/images/{common,C} $@
+ $(cmd) touch $@
else
# Default (non-Cygwin)
html/%/images: xml/%/images
@@ -715,7 +715,7 @@ html/%/images: xml/%/images
$(cmd) test -e $@ || $(LN_S) ../../$< $@
endif
-.PHONY: html-% html-images-% index index-%
+.PHONY: html-% index index-%
########################################################################
@@ -772,8 +772,8 @@ if HAVE_DBLATEX
pdf-local: $(foreach lang,$(LANGUAGES),pdf-$(lang)) ;
pdf-%: pdf/%/gimp.pdf ;
-# TODO: images (--fig-path option?); prerequisites
-pdf/%/gimp.pdf: xml/% stylesheets/plainprint.xsl | xml/%/images
+# TODO: check prerequisites, e.g. images (--fig-path option?)
+pdf/%/gimp.pdf: xml/% stylesheets/plainprint.xsl xml/%/images
$(cmd) if test -f pdf/%.pdf; then rm -f pdf/%.pdf; fi
$(cmd) test -d pdf/$* || $(MKDIR_P) pdf/$*
$(msg) "*** Making PDF ($*) ..."
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]