# Makefile to build documentation from its sources
#   This documentation is pre-generated for distributions
#   so that users can read it immediately.
#----------------------------------------------------------------

# xsltproc is a command line XSLT processor that comes with the
# GNOME libxslt library.  You can use another XSLT processor if
# you don't have it.

XSLT=xsltproc ../examples/xsl/pres2html.xsl

# Command to run JackSVG in-situ - without needing it to be installed

PRES2SVG=perl -I../lib ../script/pres2svg \
           --fontmetrics ../examples/fontmetrics/FM-svg.xml --Force

SAMPLEPRES=intro.xml

TARGETS=intro.html install.html pres.html styleinfo.html styletut.html \
        sample-basic-black.svg \
        sample-basic-white.svg \
        sample-blackboard.svg \
        sample-curve-red.svg \
        sample-movies-bw.svg \
        sample-stripes-blue.svg \
        sample-natty-blue.svg

#----------------------------------------------------------------

all: ${TARGETS}

intro.xml: ../examples/presentations/jacksvg-intro.txt
	perl ../script/txt2pres $? > $@

intro.html: intro.xml
	${XSLT} intro.xml > $@

install.html: ../examples/presentations/jacksvg-install.xml
	${XSLT} ../examples/presentations/jacksvg-install.xml > $@

pres.html: ../examples/presentations/jacksvg-pres.xml
	${XSLT} ../examples/presentations/jacksvg-pres.xml > $@

styleinfo.html: ../examples/presentations/jacksvg-style-info.xml
	${XSLT} $? > $@

styletut.html: ../examples/presentations/jacksvg-style-tutorial.xml
	${XSLT} $? > $@

#----------------------------------------------------------------

sample-basic-black.svg: ../examples/stylesheets/basic-black.xml
	${PRES2SVG} -s $? -o $@ ${SAMPLEPRES}

sample-basic-white.svg: ../examples/stylesheets/basic-white.xml
	${PRES2SVG} -s $? -o $@ ${SAMPLEPRES}

sample-blackboard.svg: ../examples/stylesheets/blackboard.xml
	${PRES2SVG} -s $? -o $@ ${SAMPLEPRES}

sample-curve-red.svg: ../examples/stylesheets/curve-red.xml
	${PRES2SVG} -s $? -o $@ ${SAMPLEPRES}

sample-movies-bw.svg: ../examples/stylesheets/movies-bw.xml
	${PRES2SVG} -s $? -o $@ ${SAMPLEPRES}

sample-stripes-blue.svg: ../examples/stylesheets/stripes-blue.xml
	${PRES2SVG} -s $? -o $@ ${SAMPLEPRES}

sample-natty-blue.svg: ../examples/stylesheets/natty-blue.xml
	${PRES2SVG} -s $? -o $@ ${SAMPLEPRES}

#----------------------------------------------------------------

clean:
	rm -f ${TARGETS} intro.xml

#----------------------------------------------------------------
#EOF

