2000-12-30 15:36:24 +00:00
|
|
|
|
2001-12-15 23:13:04 +00:00
|
|
|
# taken from selfdocbookx, http://cyberelk.net/tim/docbook/selfdocbookx/index.html
|
|
|
|
|
|
|
|
# modified by andy wingo <apwingo@eos.ncsu.edu> 14 dec 2001 for use by gstreamer
|
2002-12-18 14:44:26 +00:00
|
|
|
# and a little bit by thomas as well
|
2001-12-15 23:13:04 +00:00
|
|
|
|
|
|
|
all: html ps pdf
|
|
|
|
|
2002-12-18 14:44:26 +00:00
|
|
|
check:
|
|
|
|
xmllint -noout -valid $(MAIN)
|
|
|
|
|
2001-12-15 23:13:04 +00:00
|
|
|
if HAVE_XSLTPROC
|
|
|
|
|
|
|
|
if HAVE_FIG2DEV_PNG
|
|
|
|
html: $(DOC)
|
2002-03-02 10:33:40 +00:00
|
|
|
else #!HAVE_FIG2DEV_PNG
|
2001-12-15 23:13:04 +00:00
|
|
|
html:
|
2002-03-02 10:33:40 +00:00
|
|
|
endif #!HAVE_FIG2DEV_PNG
|
2001-12-15 23:13:04 +00:00
|
|
|
|
|
|
|
if HAVE_FIG2DEV_PDF
|
|
|
|
if HAVE_PDFXMLTEX
|
|
|
|
pdf: $(DOC).pdf
|
|
|
|
|
|
|
|
if HAVE_PDFTOPS
|
|
|
|
ps: $(DOC).ps
|
2002-03-02 10:33:40 +00:00
|
|
|
else #!HAVE_PDFTOPS
|
2001-12-15 23:13:04 +00:00
|
|
|
ps:
|
2002-03-02 10:33:40 +00:00
|
|
|
endif #!HAVE_PDFTOPS
|
2001-12-15 23:13:04 +00:00
|
|
|
|
2002-03-02 10:33:40 +00:00
|
|
|
else #!HAVE_PDFXMLTEX
|
2001-12-15 23:13:04 +00:00
|
|
|
pdf:
|
|
|
|
ps:
|
2002-03-02 10:33:40 +00:00
|
|
|
endif #!HAVE_PDFXMLTEX
|
2001-12-15 23:13:04 +00:00
|
|
|
|
2002-03-02 10:33:40 +00:00
|
|
|
else #!HAVE_FIG2DEV_PDF
|
2001-12-15 23:13:04 +00:00
|
|
|
pdf:
|
|
|
|
ps:
|
2002-03-02 10:33:40 +00:00
|
|
|
endif #!HAVE_FIG2DEV_PDF
|
2001-12-15 23:13:04 +00:00
|
|
|
|
2002-03-02 10:33:40 +00:00
|
|
|
else #!HAVE_XSLTPROC
|
2001-12-15 23:13:04 +00:00
|
|
|
html:
|
|
|
|
ps:
|
|
|
|
pdf:
|
2002-03-02 10:33:40 +00:00
|
|
|
endif #!HAVE_XSLTPROC
|
2001-12-15 23:13:04 +00:00
|
|
|
|
2002-12-18 14:44:26 +00:00
|
|
|
#$(DOC).fo: $(XML) $(PDFS) $(XSLFO) $(XSLFOMODS)
|
|
|
|
# cp magic-pdf magic
|
2003-01-19 00:40:50 +00:00
|
|
|
# xsltproc $(XSLTPROC_OPTIONS) $(XSLFO) $(MAIN) > $@-t
|
2002-12-18 14:44:26 +00:00
|
|
|
# mv -f $@-t $@
|
|
|
|
#
|
|
|
|
#$(DOC).pdf: $(DOC).fo
|
|
|
|
# pdfxmltex $< || true
|
|
|
|
# pdfxmltex $< || true
|
|
|
|
#
|
|
|
|
#$(DOC).ps: $(DOC).pdf
|
|
|
|
# pdftops $< $@
|
|
|
|
|
|
|
|
# thomasvs: use db2 because it seems a lot better
|
|
|
|
# this ought to be checked for in configure, and the old stuff removed
|
|
|
|
$(DOC).pdf: $(DOC).xml
|
|
|
|
db2pdf $(DOC).xml
|
|
|
|
|
|
|
|
$(DOC).ps: $(DOC).xml
|
|
|
|
db2ps $(DOC).xml
|
2001-12-15 23:13:04 +00:00
|
|
|
|
|
|
|
$(DOC): $(XML) $(PNGS) $(XSLHTML) $(XSLHTMLMODS)
|
|
|
|
-$(RM) *.html
|
|
|
|
-$(RM) -r $@
|
|
|
|
mkdir $@
|
|
|
|
cp magic-png magic
|
2003-01-19 00:40:50 +00:00
|
|
|
xsltproc $(XSLTPROC_OPTIONS) $(XSLHTML) $(MAIN)
|
2001-12-15 23:13:04 +00:00
|
|
|
mv *.html $@
|
|
|
|
cp $(CSS) $@
|
|
|
|
test "x$(PNGS)" != "x" && mkdir $@/images && cp $(PNGS) $@/images || true
|
|
|
|
|
|
|
|
builddate:
|
|
|
|
echo -n $$(date "+%e %B %Y") > $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
-$(RM) -f *.log *.dvi *.aux *.tex *.out *-t
|
|
|
|
-$(RM) -f $(PNGS) $(PDFS) builddate *.html
|
|
|
|
-$(RM) -rf $(DOC) $(DOC).ps $(DOC).pdf $(DOC).fo
|
2002-03-21 23:32:24 +00:00
|
|
|
-$(RM) -f magic
|
2001-12-15 23:13:04 +00:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
-$(RM) -f *~ $(DOC).tar.gz docbook.tar.gz
|
|
|
|
# -$(RM) -r docbook
|
|
|
|
|
|
|
|
$(DOC).tar.gz: distclean
|
|
|
|
(cd ..; tar zcf /tmp/$(DOC).tar.gz $(DOC) )
|
|
|
|
mv /tmp/$(DOC).tar.gz .
|
|
|
|
|
|
|
|
#docbook: $(DOC).tar.gz all
|
|
|
|
# -$(RM) -r $@
|
|
|
|
# mkdir $@
|
|
|
|
# cp $(DOC).tar.gz $(DOC).ps $(DOC).pdf $@
|
|
|
|
# tar cf - $(DOC) | (cd $@; tar xf -)
|
|
|
|
|
|
|
|
#docbook.tar.gz: docbook
|
|
|
|
# tar zcf docbook.tar.gz docbook
|
|
|
|
|
|
|
|
# Make png from xfig
|
|
|
|
%.png: %.fig
|
|
|
|
fig2dev -Lpng $< $@
|
|
|
|
|
|
|
|
# Make pdf from xfig
|
|
|
|
%.pdf: %.fig
|
2002-07-11 19:40:06 +00:00
|
|
|
fig2dev -Lpdf $< images/$@
|
2001-12-15 23:13:04 +00:00
|
|
|
|
|
|
|
.PHONY: distclean clean all builddate
|