From: Jon TURNEY <jon.turney@dronecode.org.uk>
To: cygwin-patches@cygwin.com
Cc: Jon TURNEY <jon.turney@dronecode.org.uk>
Subject: [PATCH 6/8] winsup/doc: Make it easier to extend xidepend to more targets
Date: Mon, 15 Jun 2015 12:37:00 -0000 [thread overview]
Message-ID: <1434371793-3980-7-git-send-email-jon.turney@dronecode.org.uk> (raw)
In-Reply-To: <1434371793-3980-1-git-send-email-jon.turney@dronecode.org.uk>
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
next prev parent reply other threads:[~2015-06-15 12:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 12:36 [PATCH 0/8] Generate utilities manpages Jon TURNEY
2015-06-15 12:37 ` [PATCH 3/8] winsup/doc: Some preparatory XML fixes Jon TURNEY
2015-06-15 17:04 ` Corinna Vinschen
2015-06-16 9:22 ` Jon TURNEY
2015-06-16 9:35 ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 5/8] winsup/doc: Convert utils.xml to using refentry Jon TURNEY
2015-06-15 17:11 ` Corinna Vinschen
2015-06-16 9:28 ` Jon TURNEY
2015-06-16 9:45 ` Corinna Vinschen
2015-06-16 11:09 ` Jon TURNEY
2015-06-16 12:49 ` Corinna Vinschen
2015-06-16 17:33 ` Jon TURNEY
2015-06-16 17:49 ` Corinna Vinschen
2015-06-16 18:50 ` Jon TURNEY
2015-06-16 19:17 ` Corinna Vinschen
2015-06-15 12:37 ` Jon TURNEY [this message]
2015-06-15 17:15 ` [PATCH 6/8] winsup/doc: Make it easier to extend xidepend to more targets Corinna Vinschen
2015-06-15 12:37 ` [PATCH 7/8] winsup/doc: Make and install manpages for utils Jon TURNEY
2015-06-15 18:12 ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 2/8] winsup/doc: Fix xidepend to handle relative pathnames Jon TURNEY
2015-06-15 17:02 ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 1/8] winsup/doc: Remove tarball target from .PHONY Jon TURNEY
2015-06-15 16:52 ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 8/8] winsup/doc: Fix an issue with parallel make Jon TURNEY
2015-06-15 17:16 ` Corinna Vinschen
2015-06-15 12:37 ` [PATCH 4/8] winsup/doc: Use fo.xsl to customize PDF generation from DocBook XML Jon TURNEY
2015-06-15 17:05 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434371793-3980-7-git-send-email-jon.turney@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-patches@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).