fix docs build for good

Original commit message from CVS:
fix docs build for good
This commit is contained in:
Thomas Vander Stichele 2003-10-08 14:34:09 +00:00
parent ec5122f8d3
commit 7d4cb79ffb
31 changed files with 293 additions and 181 deletions

2
common

@ -1 +1 @@
Subproject commit b7abb510aa14e8692df39ea8c2c758e37d8a8d8a Subproject commit 3f46e8a51c6020d29bafdbf9366115deb4cad02d

View file

@ -14,7 +14,7 @@ endif
SUBDIRS = $(SUBDIRS_DOCS) $(SUBDIRS_PLUGINS) SUBDIRS = $(SUBDIRS_DOCS) $(SUBDIRS_PLUGINS)
DIST_SUBDIRS = faq manual pwg gst libs plugins xsl DIST_SUBDIRS = faq manual pwg gst libs plugins xsl
EXTRA_DIST = slides manuals.mak EXTRA_DIST = slides manuals.mak htmlinstall.mak image-png image-pdf image-eps
dist-hook: dist-hook:
$(RM) -rf $(distdir)/random/CVS $(RM) -rf $(distdir)/random/CVS

View file

@ -1,37 +1,56 @@
DOC=gstreamer-faq ### this is the part you can customize if you need to
MAIN=$(DOC).xml
XML=$(wildcard *.xml)
XSLFO=$(srcdir)/../xsl/fo.xsl
XSLFOMODS=$(srcdir)/../xsl/ulink.xsl $(srcdir)/../xsl/keycombo.xsl
XSLHTML=$(srcdir)/../xsl/html.xsl
XSLHTMLMODS=$(srcdir)/../xsl/fileext.xsl $(srcdir)/../xsl/admon.xsl \
$(srcdir)/../xsl/keycombo.xsl $(srcdir)/../xsl/css.xsl
XSLS=$(XSLFO) $(XSLFOMODS) $(XSLHTML) $(XSLHTMLMODS)
SRC=$(XML)
CSS=base.css
EXTRA_DIST = $(XML) $(CSS) magic-png magic-pdf # base name of doc
DOC = gstreamer-faq
# main xml file
MAIN = $(DOC).xml
# all xml sources
XML = $(notdir $(wildcard $(srcdir)/*.xml))
# base style sheet
CSS = base.css
# image sources
PNG_SRC =
FIG_SRC = $(notdir $(wildcard $(srcdir)/*.fig))
### this is the generic bit and you shouln't need to change this
# get the generic docbuilding Makefile stuff
include $(srcdir)/../manuals.mak include $(srcdir)/../manuals.mak
# target for building the faq dir to be put on the website and rsync-ing it ### this is standard automake stuff
www: www-faq
export RSYNC_RSH=ssh # package up all the source
cd www-faq && rsync -arv * thomasvs@shell.sf.net:/home/groups/g/gs/gstreamer/htdocs/docs/faq/ EXTRA_DIST = $(SRC)
# install documentation
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/$(DOC)
doc_DATA = $(PDF_DAT) $(PS_DAT)
include $(srcdir)/../htmlinstall.mak
www-faq: gstreamer-faq ### these are website updating targets
mkdir -p www-faq # target for building the faq dir to be put on the website and rsync-ing it
cp gstreamer-faq/base.css www-faq upload: www
cd gstreamer-faq && for a in *.html; do \ export RSYNC_RSH=ssh
cd www && rsync -arv * thomasvs@shell.sf.net:/home/groups/g/gs/gstreamer/htdocs/docs/faq/
www: html
mkdir -p www
cp html/base.css www
cd html && for a in *.html; do \
xmllint --format --htmlout $$a 2> /dev/null | \ xmllint --format --htmlout $$a 2> /dev/null | \
tail +3 > ../www-faq/$$a; \ tail +3 > ../www/$$a; \
done done
cd www-faq && rename html php *.html && for a in *.php; do \ cd www && rename html php *.html && for a in *.php; do \
perl -i -p -e's@^.*\<head.*@\<?php include "../../lib/template.php"; echo get_header ("GStreamer: FAQ", "../.."); \?\>@' $$a; \ perl -i -p -e's@^.*\<head.*@\<?php include "../../lib/template.php"; echo get_header ("GStreamer: FAQ", "../.."); \?\>@' $$a; \
perl -i -p -e's@^.*\</body.*@\<?php echo get_footer(); \?\>@' $$a; \ perl -i -p -e's@^.*\</body.*@\<?php echo get_footer(); \?\>@' $$a; \
perl -i -p -e's@^.*\</html.*@@' $$a; \ perl -i -p -e's@^.*\</html.*@@' $$a; \
done done
cd www-faq && for a in *.php; do \ cd www && for a in *.php; do \
perl -i -p -e's@href="index\.html@href="index.php@' $$a; \ perl -i -p -e's@href="index\.html@href="index.php@' $$a; \
perl -i -p -e's@href="(ar.*)\.html@href="$$1.php@' $$a; \ perl -i -p -e's@href="(ar.*)\.html@href="$$1.php@' $$a; \
done done
@-cp -pr html/images www 2> /dev/null

View file

@ -1,6 +1,9 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" <!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % image-entities SYSTEM "image.entities">
%image-entities;
<!ENTITY START SYSTEM "start.xml"> <!ENTITY START SYSTEM "start.xml">
<!ENTITY GENERAL SYSTEM "general.xml"> <!ENTITY GENERAL SYSTEM "general.xml">

View file

@ -1 +0,0 @@
<!ENTITY magic "pdf">

View file

@ -1 +0,0 @@
<!ENTITY magic "png">

11
docs/htmlinstall.mak Normal file
View file

@ -0,0 +1,11 @@
# this file adds rules for installing html subtrees
# I really don't like this hack, but automake doesn't seem to want to
# install directory trees :(
install-data-local:
mkdir -p $(docdir)
cp -pr $(HTML_DAT) $(docdir)
uninstall-local:
for part in $(HTML_DAT); do rm -rf $(docdir)/$$part; done
rmdir $(docdir)

2
docs/image-eps Normal file
View file

@ -0,0 +1,2 @@
<!ENTITY image "ps">
<!ENTITY IMAGE "EPS">

2
docs/image-pdf Normal file
View file

@ -0,0 +1,2 @@
<!ENTITY image "pdf">
<!ENTITY IMAGE "EPS">

2
docs/image-png Normal file
View file

@ -0,0 +1,2 @@
<!ENTITY image "png">
<!ENTITY IMAGE "PNG">

View file

@ -1,18 +1,31 @@
DOC=gstreamer-manual ### this is the part you can customize if you need to
MAIN=$(DOC).xml
XML=$(wildcard *.xml)
XSLFO=$(srcdir)/../xsl/fo.xsl
XSLFOMODS=$(srcdir)/../xsl/ulink.xsl $(srcdir)/../xsl/keycombo.xsl
XSLHTML=$(srcdir)/../xsl/html.xsl
XSLHTMLMODS=$(srcdir)/../xsl/fileext.xsl $(srcdir)/../xsl/admon.xsl \
$(srcdir)/../xsl/keycombo.xsl $(srcdir)/../xsl/css.xsl
XSLS=$(XSLFO) $(XSLFOMODS) $(XSLHTML) $(XSLHTMLMODS)
FIGS=$(wildcard *.fig)
PNGS=$(FIGS:.fig=.png)
PDFS=$(FIGS:.fig=.pdf)
SRC=$(XML)
CSS=base.css
EXTRA_DIST = $(XML) $(FIGS) $(CSS) magic-png magic-pdf # base name of doc
DOC = gstreamer-manual
# main xml file
MAIN = $(DOC).xml
# all xml sources
XML = $(notdir $(wildcard $(srcdir)/*.xml))
# base style sheet
CSS = base.css
# image sources
PNG_SRC =
FIG_SRC = $(notdir $(wildcard $(srcdir)/*.fig))
### this is the generic bit and you shouln't need to change this
# get the generic docbuilding Makefile stuff
include $(srcdir)/../manuals.mak include $(srcdir)/../manuals.mak
### this is standard automake stuff
# package up all the source
EXTRA_DIST = $(SRC)
# install documentation
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/$(DOC)
doc_DATA = $(PDF_DAT) $(PS_DAT)
include $(srcdir)/../htmlinstall.mak

View file

@ -89,7 +89,7 @@
<title>The Hello world pipeline with MIME types</title> <title>The Hello world pipeline with MIME types</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/mime-world.&magic;" format="&MAGIC;" /> <imagedata fileref="images/mime-world.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>

View file

@ -69,7 +69,7 @@
<title>A thread</title> <title>A thread</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/thread.&magic;" format="&MAGIC;" /> <imagedata fileref="images/thread.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>

View file

@ -20,7 +20,7 @@
<title>Visualisation of a <classname>GstBin</classname> element with some elements in it</title> <title>Visualisation of a <classname>GstBin</classname> element with some elements in it</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/bin-element.&magic;" format="&MAGIC;" /> <imagedata fileref="images/bin-element.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -187,7 +187,7 @@
<title>Visualisation of a <classname>GstBin</classname> element without ghost pads</title> <title>Visualisation of a <classname>GstBin</classname> element without ghost pads</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/bin-element-noghost.&magic;" format="&MAGIC;" /> <imagedata fileref="images/bin-element-noghost.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -202,7 +202,7 @@
<title>Visualisation of a <classname>GstBin</classname> element with a ghost pad</title> <title>Visualisation of a <classname>GstBin</classname> element with a ghost pad</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/bin-element-ghost.&magic;" format="&MAGIC;" /> <imagedata fileref="images/bin-element-ghost.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>

View file

@ -34,7 +34,7 @@
<title>Visualisation of a source element</title> <title>Visualisation of a source element</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/src-element.&magic;" format="&MAGIC;" /> <imagedata fileref="images/src-element.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -62,7 +62,7 @@
<title>Visualisation of a filter element</title> <title>Visualisation of a filter element</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/filter-element.&magic;" format="&MAGIC;" /> <imagedata fileref="images/filter-element.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -76,8 +76,8 @@
more than one output pad</title> more than one output pad</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/filter-element-multi.&magic;" <imagedata fileref="images/filter-element-multi.&image;"
format="&MAGIC;" /> format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -102,7 +102,7 @@
<title>Visualisation of a sink element</title> <title>Visualisation of a sink element</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/sink-element.&magic;" format="&MAGIC;" /> <imagedata fileref="images/sink-element.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>

View file

@ -181,7 +181,7 @@ main (int argc, char *argv[])
<title>The Hello world pipeline</title> <title>The Hello world pipeline</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/hello-world.&magic;" format="&MAGIC;" /> <imagedata fileref="images/hello-world.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>

View file

@ -20,7 +20,7 @@
<title>Visualisation of a <classname>GstBin</classname> element with some elements in it</title> <title>Visualisation of a <classname>GstBin</classname> element with some elements in it</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/bin-element.&magic;" format="&MAGIC;" /> <imagedata fileref="images/bin-element.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -187,7 +187,7 @@
<title>Visualisation of a <classname>GstBin</classname> element without ghost pads</title> <title>Visualisation of a <classname>GstBin</classname> element without ghost pads</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/bin-element-noghost.&magic;" format="&MAGIC;" /> <imagedata fileref="images/bin-element-noghost.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -202,7 +202,7 @@
<title>Visualisation of a <classname>GstBin</classname> element with a ghost pad</title> <title>Visualisation of a <classname>GstBin</classname> element with a ghost pad</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/bin-element-ghost.&magic;" format="&MAGIC;" /> <imagedata fileref="images/bin-element-ghost.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>

View file

@ -34,7 +34,7 @@
<title>Visualisation of a source element</title> <title>Visualisation of a source element</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/src-element.&magic;" format="&MAGIC;" /> <imagedata fileref="images/src-element.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -62,7 +62,7 @@
<title>Visualisation of a filter element</title> <title>Visualisation of a filter element</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/filter-element.&magic;" format="&MAGIC;" /> <imagedata fileref="images/filter-element.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -76,8 +76,8 @@
more than one output pad</title> more than one output pad</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/filter-element-multi.&magic;" <imagedata fileref="images/filter-element-multi.&image;"
format="&MAGIC;" /> format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>
@ -102,7 +102,7 @@
<title>Visualisation of a sink element</title> <title>Visualisation of a sink element</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/sink-element.&magic;" format="&MAGIC;" /> <imagedata fileref="images/sink-element.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>

View file

@ -89,7 +89,7 @@
<title>The Hello world pipeline with MIME types</title> <title>The Hello world pipeline with MIME types</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/mime-world.&magic;" format="&MAGIC;" /> <imagedata fileref="images/mime-world.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>

View file

@ -1,8 +1,8 @@
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % magic-entities SYSTEM "magic"> <!ENTITY % image-entities SYSTEM "image.entities">
%magic-entities; %image-entities;
<!ENTITY INTRO SYSTEM "intro.xml"> <!ENTITY INTRO SYSTEM "intro.xml">
<!ENTITY MOTIVATION SYSTEM "motivation.xml"> <!ENTITY MOTIVATION SYSTEM "motivation.xml">

View file

@ -181,7 +181,7 @@ main (int argc, char *argv[])
<title>The Hello world pipeline</title> <title>The Hello world pipeline</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/hello-world.&magic;" format="&MAGIC;" /> <imagedata fileref="images/hello-world.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>

View file

@ -9,7 +9,7 @@
<title>Visualisation of three linked elements</title> <title>Visualisation of three linked elements</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/linked-elements.&magic;" format="&MAGIC;" /> <imagedata fileref="images/linked-elements.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>

View file

@ -1,2 +0,0 @@
<!ENTITY magic "pdf">
<!ENTITY MAGIC "PDF">

View file

@ -1,2 +0,0 @@
<!ENTITY magic "png">
<!ENTITY MAGIC "PNG">

View file

@ -26,7 +26,7 @@
<title>a two-threaded decoder with a queue</title> <title>a two-threaded decoder with a queue</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/queue.&magic;" format="&MAGIC;" /> <imagedata fileref="images/queue.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>

View file

@ -69,7 +69,7 @@
<title>A thread</title> <title>A thread</title>
<mediaobject> <mediaobject>
<imageobject> <imageobject>
<imagedata fileref="images/thread.&magic;" format="&MAGIC;" /> <imagedata fileref="images/thread.&image;" format="&IMAGE;" />
</imageobject> </imageobject>
</mediaobject> </mediaobject>
</figure> </figure>

View file

@ -1,110 +1,164 @@
# rewritten by Thomas to be more simple and working
# taken from selfdocbookx, http://cyberelk.net/tim/docbook/selfdocbookx/index.html ### These are all generic; we set all the variables we need
# modified by andy wingo <apwingo@eos.ncsu.edu> 14 dec 2001 for use by gstreamer # intermediary build path
# and a little bit by thomas as well BUILDDIR = build
# same for images
BUILDIMAGESDIR = $(BUILDDIR)/images
# images
# right now, we only allow .png and .fig as source
# we might add more later if we feel the need
# PNG's can be source or built from .fig
PNG = $(strip $(PNG_SRC) $(FIG_SRC:.fig=.png))
# EPS .ps files can be built from .png or .fig
EPS = $(strip $(FIG_SRC:.fig=.ps) $(PNG_SRC:.png=.ps))
# PDF .pdf files can be built from .png or .fig
PDF = $(strip $(FIG_SRC:.fig=.pdf) $(PNG_SRC:.png=.pdf))
# where we expect to find images during building, whether by copying
# or by generating them
PNG_BUILT = $(foreach file, $(PNG), $(BUILDIMAGESDIR)/$(file))
EPS_BUILT = $(foreach file, $(EPS), $(BUILDIMAGESDIR)/$(file))
PDF_BUILT = $(foreach file, $(PDF), $(BUILDIMAGESDIR)/$(file))
# everything considered source
SRC = $(XML) $(PNG_SRC) $(FIG_SRC) $(CSS)
# generate A4 docs
PAPER_LOCALE = nl_NL
### generate all documentation by default
all: html ps pdf all: html ps pdf
check: # can we generate HTML ?
xmllint -noout -valid $(MAIN) if DOC_HTML
HTML_DAT = html
if HAVE_XSLTPROC html: html/index.html
else #!DOC_HTML
if HAVE_FIG2DEV_PNG HTML_DAT =
html: $(DOC)
else #!HAVE_FIG2DEV_PNG
html: html:
endif #!HAVE_FIG2DEV_PNG endif #DOC_HTML
if HAVE_FIG2DEV_PDF # can we generate PS ?
if HAVE_PDFXMLTEX if DOC_PS
pdf: $(DOC).pdf PS_DAT = $(DOC).ps
if HAVE_PDFTOPS
ps: $(DOC).ps ps: $(DOC).ps
else #!HAVE_PDFTOPS else #!DOC_PS
PS_DAT =
ps: ps:
endif #!HAVE_PDFTOPS endif #DOC_PS
else #!HAVE_PDFXMLTEX # can we generate PDF ?
if DOC_PDF
PDF_DAT = $(DOC).pdf
pdf: $(DOC).pdf
else #!DOC_PDF
PDF_DAT =
pdf: pdf:
ps: endif #DOC_PDF
endif #!HAVE_PDFXMLTEX
else #!HAVE_FIG2DEV_PDF debug:
pdf: @echo "outputting some useful debug information"
ps: @echo "Source XML:"
endif #!HAVE_FIG2DEV_PDF @echo "XML: '$(XML)'"
@echo "CSS: '$(CSS)'"
@echo "Source image files:"
@echo "PNG_SRC: '$(PNG_SRC)'"
@echo "FIG_SRC: '$(FIG_SRC)'"
@echo "All used image files:"
@echo "PNG: '$(PNG)'"
@echo "EPS: '$(EPS)'"
@echo "PDF: '$(PDF)'"
@echo "All used image files in their built path:"
@echo "PNG_BUILT: '$(PNG_BUILT)'"
@echo "EPS_BUILT: '$(EPS_BUILT)'"
@echo "PDF_BUILT: '$(PDF_BUILT)'"
@echo "End result products:"
@echo "HTML_DAT: '$(HTML_DAT)'"
@echo "PS_DAT: '$(PS_DAT)'"
@echo "PDF_DAT: '$(PDF_DAT)'"
else #!HAVE_XSLTPROC # a rule to copy all of the source for docs into $(builddir)/build
html: $(BUILDDIR)/$(MAIN): $(XML) $(CSS)
ps: @-mkdir -p $(BUILDDIR)
pdf: @for a in $(XML); do cp $(srcdir)/$$a $(BUILDDIR); done
endif #!HAVE_XSLTPROC @for a in $(CSS); do cp $(srcdir)/$$a $(BUILDDIR); done
#$(DOC).fo: $(XML) $(PDFS) $(XSLFO) $(XSLFOMODS) html/index.html: $(BUILDDIR)/$(MAIN) $(PNG_BUILT) $(FIG_SRC)
# cp magic-pdf magic @echo "*** Generating HTML output ***"
# xsltproc $(XSLTPROC_OPTIONS) $(XSLFO) $(MAIN) > $@-t @-mkdir -p html
# mv -f $@-t $@ @cp $(srcdir)/../image-png $(BUILDDIR)/image.entities
# @cd $(BUILDDIR) && xmlto html -o ../html $(MAIN)
#$(DOC).pdf: $(DOC).fo @test "x$(CSS)" != "x" && \
# pdfxmltex $< || true echo "Copying .css files: $(CSS)" && \
# pdfxmltex $< || true cp $(srcdir)/$(CSS) html
# @test "x$(PNG)" != "x" && \
#$(DOC).ps: $(DOC).pdf echo "Copying .png images: $(PNG_BUILT)" && \
# pdftops $< $@ mkdir -p html/images && \
cp $(PNG_BUILT) html/images || true
# thomasvs: use db2 because it seems a lot better $(DOC).ps: $(BUILDDIR)/$(MAIN) $(EPS_BUILT) $(PNG_SRC) $(FIG_SRC)
# this ought to be checked for in configure, and the old stuff removed @echo "*** Generating PS output ***"
$(DOC).pdf: $(DOC).xml @cp $(srcdir)/../image-eps $(BUILDDIR)/image.entities
db2pdf $(DOC).xml export LC_PAPER=$(PAPER_LOCALE) && cd $(BUILDDIR) && xmlto ps -o .. $(MAIN)
$(DOC).ps: $(DOC).xml $(DOC).pdf: $(DOC).ps
db2ps $(DOC).xml @echo "*** Generating PDF output ***"
@ps2pdf $(DOC).ps
$(DOC): $(XML) $(PNGS) $(XSLHTML) $(XSLHTMLMODS) #$(DOC).pdf: $(MAIN) $(PDF) $(FIG_SRC)
-$(RM) *.html # @echo "*** Generating PDF output ***"
-$(RM) -r $@ # @cp $(srcdir)/../image-pdf image.entities
mkdir $@ # @export LC_PAPER=$(PAPER_LOCALE) && xmlto pdf $(MAIN)
cp magic-png magic # @rm image.entities
xsltproc $(XSLTPROC_OPTIONS) $(XSLHTML) $(MAIN)
mv *.html $@
cp $(CSS) $@
test "x$(PNGS)" != "x" && mkdir $@/images && cp $(PNGS) $@/images || true
builddate:
echo -n $$(date "+%e %B %Y") > $@
clean: clean:
-$(RM) -f *.log *.dvi *.aux *.tex *.out *-t -$(RM) -r $(BUILDDIR)
-$(RM) -f $(PNGS) $(PDFS) builddate *.html -$(RM) -r html
-$(RM) -rf $(DOC) $(DOC).ps $(DOC).pdf $(DOC).fo -$(RM) $(DOC).ps
-$(RM) -f magic -$(RM) $(DOC).pdf
-$(RM) -r www
distclean: clean ### image generation
-$(RM) -f *~ $(DOC).tar.gz docbook.tar.gz
# -$(RM) -r docbook
$(DOC).tar.gz: distclean # copy png from source dir png
(cd ..; tar zcf /tmp/$(DOC).tar.gz $(DOC) ) $(BUILDIMAGESDIR)/%.png: $(srcdir)/%.png
mv /tmp/$(DOC).tar.gz . @echo "Copying $< to $@"
@mkdir -p $(BUILDIMAGESDIR)
@cp $< $@
# make png from fig
$(BUILDIMAGESDIR)/%.png: %.fig
@echo "Generating $@ from $<"
@mkdir -p $(BUILDIMAGESDIR)
@fig2dev -Lpng $< $@
#docbook: $(DOC).tar.gz all # make ps(EPS) from fig
# -$(RM) -r $@ $(BUILDIMAGESDIR)/%.ps: %.fig
# mkdir $@ @echo "Generating $@ from $<"
# cp $(DOC).tar.gz $(DOC).ps $(DOC).pdf $@ @mkdir -p $(BUILDIMAGESDIR)
# tar cf - $(DOC) | (cd $@; tar xf -) @fig2dev -Leps $< $@
#docbook.tar.gz: docbook # make pdf from fig
# tar zcf docbook.tar.gz docbook $(BUILDIMAGESDIR)/%.pdf: %.fig
@echo "Generating $@ from $<"
@mkdir -p $(BUILDIMAGESDIR)
@fig2dev -Lpdf $< $@
# Make png from xfig # make pdf from png
%.png: %.fig $(BUILDIMAGESDIR)/%.pdf: %.png
fig2dev -Lpng $< $@ @echo "Generating $@ from $<"
@mkdir -p $(BUILDIMAGESDIR)
@cat $< | pngtopnm | pnmtops -noturn 2> /dev/null | epstopdf --filter --outfile $@ 2> /dev/null
# Make pdf from xfig # make ps(EPS) from png
%.pdf: %.fig $(BUILDIMAGESDIR)/%.ps: %.png
fig2dev -Lpdf $< images/$@ @echo "Generating $@ from $<"
@mkdir -p $(BUILDIMAGESDIR)
@cat $< | pngtopnm | pnmtops -noturn > $@ 2> /dev/null
.PHONY: distclean clean all builddate # make sure xml validates properly
check-local:
xmllint -noout -valid $(MAIN)

View file

@ -1,18 +1,32 @@
DOC=gst-plugin-writers-guide ### this is the part you can customize if you need to
MAIN=$(DOC).xml
XML=$(wildcard *.xml)
XSLFO=$(srcdir)/../xsl/fo.xsl
XSLFOMODS=$(srcdir)/../xsl/ulink.xsl $(srcdir)/../xsl/keycombo.xsl
XSLHTML=$(srcdir)/../xsl/html.xsl
XSLHTMLMODS=$(srcdir)/../xsl/fileext.xsl $(srcdir)/../xsl/admon.xsl \
$(srcdir)/../xsl/keycombo.xsl $(srcdir)/../xsl/css.xsl
XSLS=$(XSLFO) $(XSLFOMODS) $(XSLHTML) $(XSLHTMLMODS)
FIGS= # $(wildcard *.fig) (uncomment when pngs are added)
PNGS=$(FIGS:.fig=.png)
PDFS=$(FIGS:.fig=.pdf)
SRC=$(XML)
CSS=base.css
EXTRA_DIST = $(XML) $(FIGS) $(CSS) magic-png magic-pdf # base name of doc
DOC = gst-plugin-writers-guide
# main xml file
MAIN = $(DOC).xml
# all xml sources
XML = $(notdir $(wildcard $(srcdir)/*.xml))
# base style sheet
CSS = base.css
# image sources
PNG_SRC =
FIG_SRC = $(notdir $(wildcard $(srcdir)/*.fig))
### this is the generic bit and you shouln't need to change this
# get the generic docbuilding Makefile stuff
include $(srcdir)/../manuals.mak include $(srcdir)/../manuals.mak
### this is standard automake stuff
# package up all the source
EXTRA_DIST = $(SRC)
# install documentation
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)/$(DOC)
doc_DATA = $(PDF_DAT) $(PS_DAT)
include $(srcdir)/../htmlinstall.mak

View file

@ -1,8 +1,8 @@
<?xml version='1.0'?> <?xml version='1.0'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % magic-entities SYSTEM "magic"> <!ENTITY % image-entities SYSTEM "image.entities">
%magic-entities; %image-entities;
<!ENTITY TITLEPAGE SYSTEM "titlepage.xml"> <!ENTITY TITLEPAGE SYSTEM "titlepage.xml">

View file

@ -1 +0,0 @@
<!ENTITY magic "pdf">

View file

@ -1 +0,0 @@
<!ENTITY magic "png">