]> granicus.if.org Git - docbook-dsssl/commitdiff
created separate makefiles for all subdirs; also, build PDF
authorMichael Smith <xmldoc@users.sourceforge.net>
Tue, 26 Apr 2005 02:22:35 +0000 (02:22 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Tue, 26 Apr 2005 02:22:35 +0000 (02:22 +0000)
13 files changed:
slides/demo/Makefile
slides/demo/default/Makefile [new file with mode: 0644]
slides/demo/frames1/Makefile [new file with mode: 0644]
slides/demo/frames2/Makefile [new file with mode: 0644]
slides/demo/frames3/Makefile [new file with mode: 0644]
slides/demo/frames4/Makefile [new file with mode: 0644]
slides/demo/frames5/Makefile [new file with mode: 0644]
slides/demo/frames6/Makefile [new file with mode: 0644]
slides/demo/frames7/Makefile [new file with mode: 0644]
slides/demo/plain/Makefile [new file with mode: 0644]
slides/demo/tables/Makefile [new file with mode: 0644]
slides/demo/vslides/Makefile [new file with mode: 0644]
slides/demo/w3c/Makefile [new file with mode: 0644]

index 1c68cc236706d559e09ee4ad7558e5b28a47ba4c..98fe8c7cf177e57f3e91f1d0f769b20b62d7fd0c 100644 (file)
@@ -1,55 +1,66 @@
-XSLTPROC=saxon
-SLIDES=../source/slides.xml
-XSLT=$(XSLTPROC) $(SLIDES)
-HTML=html
-
-all: default plain tables vslides w3c frames browser graphics
-
-frames: frames1 frames2 frames3 frames4 frames5 frames6 frames7
-
-.PHONY: browser graphics \
-        default plain tables vslides w3c \
-        frames1 frames2 frames3 frames4 frames5 frames6 frames7
-
-browser:
-       mkdir -p browser
-       cd browser && cp ../../browser/*.css ../../browser/*.js .
-
-graphics:
-       cd ../graphics && tar cf - `find . -type f -name "*.gif" -o -name "*.png"` | (cd ../demo/graphics; tar xf -)
-
-default:
-       cd default && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/default.xsl
-
-plain:
-       cd plain && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/plain.xsl
-
-tables:
-       cd tables && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/tables.xsl
-
-vslides:
-       cd vslides && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/vslides.xsl
-
-w3c:
-       cd w3c && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/w3c.xsl
-
-frames1:
-       cd frames1 && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/frames.xsl - overlay=0 multiframe=0 dynamic.toc=0 active.toc=0
-
-frames2:
-       cd frames2 && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/frames.xsl - overlay=1 multiframe=0 dynamic.toc=0 active.toc=0
-
-frames3:
-       cd frames3 && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/frames.xsl - overlay=0 multiframe=1 dynamic.toc=0 active.toc=0
-
-frames4:
-       cd frames4 && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/frames.xsl - overlay=0 multiframe=0 dynamic.toc=1 active.toc=0
-
-frames5:
-       cd frames5 && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/frames.xsl - overlay=0 multiframe=0 dynamic.toc=0 active.toc=1
-
-frames6:
-       cd frames6 && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/frames.xsl - overlay=1 multiframe=0 dynamic.toc=1 active.toc=1
-
-frames7:
-       cd frames7 && rm -f *.html && $(XSLT) ../../xsl/$(HTML)/frames.xsl - overlay=0 multiframe=1 dynamic.toc=1 active.toc=1
+include ../../cvstools/Makefile.incl
+
+VPATH=./source
+FORMATTER=xep
+FOSTYLE=../xsl/fo/plain.xsl
+FO_OPTS= ulink.show=0 ulink.footnotes=1 draft.mode="no"
+DOCSTYLE=http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
+
+DIRS = browser graphics \
+       default plain tables vslides w3c \
+       frames1 frames2 frames3 frames4 frames5 frames6 frames7
+
+all: index.html slides.pdf
+       for i in $(DIRS) __bogus__; do \
+               if [ $$i != __bogus__ ] ; then \
+                       echo "$(MAKE) -C $$i"; $(MAKE) -C $$i; \
+               fi \
+       done
+
+index.html: index.xml
+       $(XSLT) $< $(DOCSTYLE) > $@
+
+%.fo : %.xml
+ifeq ($(FORMATTER),tex)
+       $(XSLT) $< $(FOSTYLE) $@ $(FO_OPTS) passivetex.extensions=1
+else
+ifeq ($(FORMATTER),fop)
+       $(XSLT) $< $(FOSTYLE) $@ $(FO_OPTS) fop.extensions=1
+else
+ifeq ($(FORMATTER),xep)
+       $(XSLT) $< $(FOSTYLE) $@ $(FO_OPTS) xep.extensions=1
+else
+       $(XSLT) $< $(FOSTYLE) $@ $(FO_OPTS)
+endif
+endif
+endif
+
+%.pdf : %.fo
+ifeq ($(FORMATTER),tex)
+       pdftex "&pdfxmltex" $<
+       @if [ `grep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \
+               pdftex "&pdfxmltex" $< ; \
+       fi
+       @if [ `grep Rerun $(basename $@).log | wc -l` -gt 0 ]; then \
+               pdftex "&pdfxmltex" $< ; \
+       fi
+else
+ifeq ($(FORMATTER),fop)
+       fop $< $@
+else
+ifeq ($(FORMATTER),xep)
+       xep $<
+else
+       echo How would you like me to make the PDF file?
+endif
+endif
+endif
+
+clean:
+       for i in $(DIRS) __bogus__; do \
+               if [ $$i != __bogus__ ] ; then \
+                       echo "$(MAKE) clean -C $$i"; $(MAKE) clean -C $$i; \
+               fi \
+       done
+       rm -f index.html
+       rm -f slides.pdf
diff --git a/slides/demo/default/Makefile b/slides/demo/default/Makefile
new file mode 100644 (file)
index 0000000..2983522
--- /dev/null
@@ -0,0 +1,9 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+index.html: ../../xsl/html/default.xsl
+
+       $(XSLT) $(SLIDES) $<
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/frames1/Makefile b/slides/demo/frames1/Makefile
new file mode 100644 (file)
index 0000000..18045b8
--- /dev/null
@@ -0,0 +1,8 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+toc.html:
+       $(XSLT) $(SLIDES) ../../xsl/html/frames.xsl - overlay=0 multiframe=0 dynamic.toc=0 active.toc=0
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/frames2/Makefile b/slides/demo/frames2/Makefile
new file mode 100644 (file)
index 0000000..00379cb
--- /dev/null
@@ -0,0 +1,8 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+toc.html:
+       $(XSLT) $(SLIDES) ../../xsl/html/frames.xsl - overlay=1 multiframe=0 dynamic.toc=0 active.toc=0
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/frames3/Makefile b/slides/demo/frames3/Makefile
new file mode 100644 (file)
index 0000000..6bcad15
--- /dev/null
@@ -0,0 +1,8 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+toc.html:
+       $(XSLT) $(SLIDES) ../../xsl/html/frames.xsl - overlay=0 multiframe=1 dynamic.toc=0 active.toc=0
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/frames4/Makefile b/slides/demo/frames4/Makefile
new file mode 100644 (file)
index 0000000..d42206c
--- /dev/null
@@ -0,0 +1,8 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+toc.html:
+       $(XSLT) $(SLIDES) ../../xsl/html/frames.xsl - overlay=0 multiframe=0 dynamic.toc=1 active.toc=0
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/frames5/Makefile b/slides/demo/frames5/Makefile
new file mode 100644 (file)
index 0000000..27e83e5
--- /dev/null
@@ -0,0 +1,8 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+toc.html:
+       $(XSLT) $(SLIDES) ../../xsl/html/frames.xsl - overlay=0 multiframe=0 dynamic.toc=0 active.toc=1
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/frames6/Makefile b/slides/demo/frames6/Makefile
new file mode 100644 (file)
index 0000000..d295ee7
--- /dev/null
@@ -0,0 +1,8 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+toc.html:
+       $(XSLT) $(SLIDES) ../../xsl/html/frames.xsl - overlay=1 multiframe=0 dynamic.toc=1 active.toc=1
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/frames7/Makefile b/slides/demo/frames7/Makefile
new file mode 100644 (file)
index 0000000..e17d649
--- /dev/null
@@ -0,0 +1,8 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+toc.html:
+       $(XSLT) $(SLIDES) ../../xsl/html/frames.xsl - overlay=0 multiframe=1 dynamic.toc=1 active.toc=1
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/plain/Makefile b/slides/demo/plain/Makefile
new file mode 100644 (file)
index 0000000..61b849e
--- /dev/null
@@ -0,0 +1,9 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+index.html: ../../xsl/html/plain.xsl
+
+       $(XSLT) $(SLIDES) $<
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/tables/Makefile b/slides/demo/tables/Makefile
new file mode 100644 (file)
index 0000000..d0e3bf8
--- /dev/null
@@ -0,0 +1,9 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+index.html: ../../xsl/html/tables.xsl
+
+       $(XSLT) $(SLIDES) $<
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/vslides/Makefile b/slides/demo/vslides/Makefile
new file mode 100644 (file)
index 0000000..2deb8b6
--- /dev/null
@@ -0,0 +1,9 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+index.html: ../../xsl/html/vslides.xsl
+
+       $(XSLT) $(SLIDES) $<
+
+clean:
+       rm -f *.html
diff --git a/slides/demo/w3c/Makefile b/slides/demo/w3c/Makefile
new file mode 100644 (file)
index 0000000..b26da6d
--- /dev/null
@@ -0,0 +1,9 @@
+include ../../../cvstools/Makefile.incl
+SLIDES=../source/slides.xml
+
+index.html: ../../xsl/html/w3c.xsl
+
+       $(XSLT) $(SLIDES) $<
+
+clean:
+       rm -f *.html