This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] winsup/doc: Make it easier to extend xidepend to more targets
- From: Jon TURNEY <jturney at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 16 Jun 2015 09:29:57 -0000
- Subject: [newlib-cygwin] winsup/doc: Make it easier to extend xidepend to more targets
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=38529ea03a86161acef137bb74be276c5c7fcf8c
commit 38529ea03a86161acef137bb74be276c5c7fcf8c
Author: Jon TURNEY <jon.turney@dronecode.org.uk>
Date: Fri Jun 12 13:30:50 2015 +0100
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>
Diff:
---
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 c364b8d..937cb39 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 (cygwin-ug-net/cygwin-ug-net.pdf)
(cygwin-api/cygwin-api.pdf): Use fo.xsl to customized DocBook
XML->PDF conversion.
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index 2d71728..14a8f22 100644
--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
@@ -28,6 +28,7 @@ CC_FOR_TARGET:=@CC@
XMLTO:=xmlto --skip-validation --with-dblatex
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"