mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 02:50:25 +08:00
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>
This commit is contained in:
parent
c46fe19460
commit
38529ea03a
@ -1,3 +1,10 @@
|
||||
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)
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user