This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 6/8] winsup/doc: Make it easier to extend xidepend to more targets


Change xidepend to create a variable containing all the XIncluded sources, which
can be used as a dependency, rather than writing the dependency target itself.

Future work: Makefile.dep should depend on xidepend, but xidepend should not be
passed to itself.

2015-06-12  Jon Turney  <jon.turney@dronecode.org.uk>

	* xidepend: Write a Makefile fragment defining variables
	containing all the XIncluded sources, rather than a dependency on
	those sources.
	* Makefile.in: Use that variable to express the dependency.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
 winsup/doc/ChangeLog   |  7 +++++++
 winsup/doc/Makefile.in | 15 +++++++--------
 winsup/doc/xidepend    |  2 +-
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 7b15a5d..7d33752 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,5 +1,12 @@
 2015-06-12  Jon Turney  <jon.turney@dronecode.org.uk>
 
+	* xidepend: Write a Makefile fragment defining variables
+	containing all the XIncluded sources, rather than a dependency on
+	those sources.
+	* Makefile.in: Use that variable to express the dependency.
+
+2015-06-12  Jon Turney  <jon.turney@dronecode.org.uk>
+
 	* Makefile.in (XMLTO): Switch from dblatex to fop.
 	* utils.xml : Convert from using a sect2 to using a refentry for
 	each utility program.
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index bcc32e4..79a050a 100644
--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
@@ -28,6 +28,7 @@ CC_FOR_TARGET:=@CC@
 XMLTO:=xmlto --skip-validation --with-fop
 
 include $(srcdir)/../Makefile.common
+-include Makefile.dep
 
 FAQ_SOURCES:= $(wildcard $(srcdir)/faq*.xml)
 
@@ -61,7 +62,7 @@ install-all: install-pdf install-html
 install-pdf: cygwin-ug-net/cygwin-ug-net.pdf cygwin-api/cygwin-api.pdf
 	@$(MKDIRP) $(DESTDIR)$(docdir)
 	$(INSTALL_DATA) $^ $(DESTDIR)$(docdir)
-	
+
 install-html: cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html
 	@$(MKDIRP) $(DESTDIR)$(htmldir)/cygwin-ug-net
 	$(INSTALL_DATA) cygwin-ug-net/*.html $(DESTDIR)$(htmldir)/cygwin-ug-net
@@ -70,22 +71,22 @@ install-html: cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html
 	$(INSTALL_DATA) cygwin-api/*.html $(DESTDIR)$(htmldir)/cygwin-api
 	$(INSTALL_DATA) cygwin-api/cygwin-api.html $(DESTDIR)$(htmldir)/cygwin-api/index.html
 
-cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : cygwin-ug-net.xml
+cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : $(cygwin-ug-net_SOURCES) cygwin.xsl
 	-$(XMLTO) html-nochunks -m $(srcdir)/cygwin.xsl $<
 	-cp cygwin-ug-net.html cygwin-ug-net/cygwin-ug-net-nochunks.html
 	-rm -f cygwin-ug-net/cygwin-ug-net-nochunks.html.gz
 	-gzip cygwin-ug-net/cygwin-ug-net-nochunks.html
 
-cygwin-ug-net/cygwin-ug-net.html : cygwin-ug-net.xml cygwin.xsl
+cygwin-ug-net/cygwin-ug-net.html : $(cygwin-ug-net_SOURCES) cygwin.xsl
 	-$(XMLTO) html -o cygwin-ug-net/ -m $(srcdir)/cygwin.xsl $<
 
-cygwin-ug-net/cygwin-ug-net.pdf : cygwin-ug-net.xml fo.xsl
+cygwin-ug-net/cygwin-ug-net.pdf : $(cygwin-ug-net_SOURCES) fo.xsl
 	-$(XMLTO) pdf -o cygwin-ug-net/ -m $(srcdir)/fo.xsl $<
 
-cygwin-api/cygwin-api.html : cygwin-api.xml cygwin.xsl
+cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) cygwin.xsl
 	-$(XMLTO) html -o cygwin-api/ -m $(srcdir)/cygwin.xsl $<
 
-cygwin-api/cygwin-api.pdf : cygwin-api.xml fo.xsl
+cygwin-api/cygwin-api.pdf : $(cygwin-api_SOURCES) fo.xsl
 	-$(XMLTO) pdf -o cygwin-api/ -m $(srcdir)/fo.xsl $<
 
 faq/faq.html : $(FAQ_SOURCES)
@@ -94,5 +95,3 @@ faq/faq.html : $(FAQ_SOURCES)
 
 Makefile.dep: cygwin-ug-net.xml cygwin-api.xml
 	cd $(srcdir) && ./xidepend $^ > "${CURDIR}/$@"
-
--include Makefile.dep
diff --git a/winsup/doc/xidepend b/winsup/doc/xidepend
index f476620..cc04f4a 100755
--- a/winsup/doc/xidepend
+++ b/winsup/doc/xidepend
@@ -16,7 +16,7 @@ do
 	then
 		# This file uses XIncludes.  Let's chase its deps recursively.
 		base=`basename "$f" .xml`
-		if [ $subproc -eq 0 ] ; then echo -n "$base/$base.html $base/$base.pdf:" ; fi
+		if [ $subproc -eq 0 ] ; then echo -n "${base}_SOURCES=${f}" ; fi
 
 		deps=`grep 'xi:include.*href' "$f" | cut -f2 -d\" | tr '\n' ' '`
 		echo -n " $deps"
-- 
2.1.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]