Force update of XML files if one of its include files changes
authorJelmer Vernooij <jelmer@samba.org>
Tue, 29 Mar 2005 19:24:12 +0000 (19:24 +0000)
committerGerald W. Carter <jerry@samba.org>
Wed, 23 Apr 2008 13:46:24 +0000 (08:46 -0500)
avoid rebuilding dependency files for "make clobber"
(This used to be commit f4901df3d3f2f69390cc807248ac103ce883d26d)

docs/Makefile

index 1a9ac767ea20f3545c75365745d65cfec9419554..344c01d015e806f0023479b35e0465b5801ba35e 100644 (file)
@@ -39,9 +39,9 @@ help:
        @echo " samples - Extract examples"
        @echo " files - Extract other files"
 
-Samba-Guide/index.xml: $(subst Samba-Guide/index.xml,,$(wildcard Samba-Guide/*.xml))
-Samba-HOWTO-Collection/index.xml: $(subst Samba-HOWTO-Collection/index.xml,,$(wildcard Samba-HOWTO-Collection/*.xml)) Samba-HOWTO-Collection-attributions.xml
-Samba-Developers-Guide/index.xml: $(subst Samba-Developers-Guide/index.xml,,$(wildcard Samba-Developers-Guide/*.xml)) Samba-Developers-Guide-attributions.xml
+$(DOCBOOKDIR)/Samba-Guide.xml: $(filter-out Samba-Guide/index.xml,$(wildcard Samba-Guide/*.xml))
+$(DOCBOOKDIR)/Samba-HOWTO-Collection.xml: $(filter-out Samba-HOWTO-Collection/index.xml,$(wildcard Samba-HOWTO-Collection/*.xml)) Samba-HOWTO-Collection-attributions.xml
+$(DOCBOOKDIR)/Samba-Developers-Guide.xml: $(filter-out Samba-Developers-Guide/index.xml,$(wildcard Samba-Developers-Guide/*.xml)) Samba-Developers-Guide-attributions.xml
 
 # Pseudo targets 
 all: $(TARGETS)
@@ -70,7 +70,7 @@ htmlhelp: $(addprefix $(HTMLHELPDIR)/,$(MAIN_DOCS))
 validate: $(addsuffix -validate,$(MAIN_DOCS))
 
 # Intermediate docbook docs
-
+#
 $(DOCBOOKDIR)/%.xml: %/index.xml xslt/expand-sambadoc.xsl
        mkdir -p $(@D)
        $(XSLTPROC) --stringparam latex.imagebasedir "$*/" --stringparam noreference 1 --xinclude --output $@ xslt/expand-sambadoc.xsl $<
@@ -164,9 +164,11 @@ $(PDFDIR)/%.pdf: %.pdf
        @echo "$*-images-htmlhelp: \$$(addprefix \$$(HTMLHELPDIR)/$*/, \$$($*-images-html))" >> $@
        @echo " touch \$$@" >> $@
 
-ifdef OUTPUTDIR
+ifdef OUTPUTDIR 
+ifneq ($(MAKECMDGOALS),clobber)
 include $(addsuffix .d,$(MAIN_DOCS))
 endif
+endif
 
 # Adobe PDF files
 %.pdf: %.tex %.ind latexfigures %-images-latex-png