1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
#
# Copyright (C) 2003 Stefan Seefeld
# All rights reserved.
# Licensed to the public under the terms of the GNU LGPL (>= 2),
# see the file COPYING for details.
#
SHELL := /bin/sh
xsltproc:= xsltproc --novalid --path $(shell pwd) --xinclude
fop := xmlroff --backend=cairo
srcdir := @srcdir@
processors := Synopsis.Parsers.Python.Parser \
Synopsis.Parsers.IDL.Parser \
Synopsis.Parsers.Cpp.Parser \
Synopsis.Parsers.C.Parser \
Synopsis.Parsers.Cxx.Parser \
Synopsis.Processors.Linker \
Synopsis.Processors.MacroFilter \
Synopsis.Processors.Comments.Filter \
Synopsis.Processors.Comments.Translator \
Synopsis.Formatters.Dump.Formatter \
Synopsis.Formatters.DocBook.Formatter \
Synopsis.Formatters.Texinfo.Formatter \
Synopsis.Formatters.Dot.Formatter \
Synopsis.Formatters.HTML.Formatter \
Synopsis.Formatters.SXR.Formatter
appendix:= $(patsubst %, %.xml, $(processors))
examples:= $(shell cd $(srcdir) && find examples -path '*/.svn' -prune -o -type f -a -print)
.PHONY: examples
vpath %.xml $(srcdir)
all: html pdf
html: html/Tutorial html/DevGuide html/examples
pdf: Tutorial.pdf DevGuide.pdf print/examples
html/Tutorial: Tutorial.xml $(appendix) examples
mkdir -p $@
cp $(srcdir)/synopsis.css $@
$(xsltproc) -o $@/ $(srcdir)/html.xsl $<
mkdir -p $@/images
cp $(srcdir)/images/*.png $@/images/
cp examples/Paths/diagrams/*.png $@/images/
html/DevGuide: DevGuide.xml
mkdir -p $@
cp $(srcdir)/synopsis.css $@
$(xsltproc) -o $@/ $(srcdir)/html.xsl $<
mkdir -p $@/images
cp $(srcdir)/images/*.png $@/images/
html/examples: examples
mkdir -p $@
make -C examples install-html prefix=$(abspath $@)
print/examples: examples
mkdir -p $@
make -C examples install-print prefix=$(abspath $@)
examples:
make -C examples
print/Tutorial.pdf: $(appendix)
%.pdf: %.fo
$(fop) $< $@
%.fo: %.xml
$(xsltproc) -o $@ $(srcdir)/fo.xsl $^
mkdir -p images
cp -u $(srcdir)/images/*.svg images/
$(appendix): %.xml:
python $(srcdir)/parameters.py $(patsubst %.xml, %, $@) $@
clean:
rm -f Synopsis.*.xml
rm -f Tutorial.fo DevGuide.fo
distclean: clean
rm -rf html print Tutorial.pdf DevGuide.pdf
|