2 ###############################################################################
6 # Purpose: Makefile for the clsql documentation
7 # Programer: Kevin M. Rosenberg
8 # Date Started: Mar 2002
10 # This file, part of CLSQL, is Copyright (c) 2002-2010 by Kevin M. Rosenberg
12 # CLSQL users are granted the rights to distribute and use this software
13 # as governed by the terms of the Lisp Lesser GNU Public License
14 # (http://opensource.franz.com/preamble.html), also known as the LLGPL.
15 ###############################################################################
17 DOCFILE_BASE_DEFAULT:=clsql
18 DOCFILE_EXT_DEFAULT:=xml
21 # Standard docfile processing
23 DEBIAN=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Debian.*')
24 SUSE=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*SuSE.*')
25 SUSE91=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*SuSE Linux 9.1.*')
26 REDHAT=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Red Hat.*')
27 MANDRAKE=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Mandrake.*')
28 DARWIN=$(shell expr "`uname -a`" : '.*Darwin.*')
56 DOCFILE_BASE=${DOCFILE_BASE_DEFAULT}
60 DOCFILE_EXT=${DOCFILE_EXT_DEFAULT}
63 DOCFILE:=${DOCFILE_BASE}.${DOCFILE_EXT}
64 FOFILE:=${DOCFILE_BASE}.fo
65 PDFFILE:=${DOCFILE_BASE}.pdf
66 PSFILE:=${DOCFILE_BASE}.ps
67 DVIFILE:=${DOCFILE_BASE}.dvi
68 TXTFILE:=${DOCFILE_BASE}.txt
69 HTMLFILE:=${DOCFILE_BASE}.html
70 TMPFILES:=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log
71 DOCFILES:=$(shell echo *.xml *.xsl)
77 CATALOG:=`pwd`/catalog-${OS}.xml
78 CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1
91 @echo "Operating system detected: ${OS}"
97 html.tar.gz: $(DOCFILES) Makefile
100 @XML_CATALOG_FILES="$(CATALOG)" $(XSLTPROC) --stringparam chunker.output.encoding UTF-8 \
101 --xinclude --output html/ html_chunk.xsl $(DOCFILE)
102 @GZIP='-9' tar czf html.tar.gz html
107 ${FOFILE}: $(DOCFILES) Makefile
108 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --stringparam fop1.extensions 1 --output $(FOFILE) fo.xsl $(DOCFILE)
113 ${PDFFILE}: ${DOCFILES} Makefile
115 @fop $(FOFILE) -pdf $(PDFFILE) > /dev/null
123 ${PSFILE}: ${DOCFILES} Makefile
125 @fop $(FOFILE) -ps $(PSFILE) > /dev/null
131 ${TXTFILE}: ${FOFILE}
132 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output ${HTMLFILE} html.xsl $(DOCFILE)
133 lynx -dump ${HTMLFILE} > ${TXTFILE}
137 @rm -f *~ *.bak *.orig \#*\# .\#* texput.log
138 @rm -rf html ${PSFILE} ${HTMLFILE}
139 @rm -f ${TMPFILES} ${FOFILE}
140 @rm -f ${DVIFILE} ${TXTFILE}