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.*')
29 UBUNTU=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Ubuntu.*')
61 DOCFILE_BASE=${DOCFILE_BASE_DEFAULT}
65 DOCFILE_EXT=${DOCFILE_EXT_DEFAULT}
68 DOCFILE:=${DOCFILE_BASE}.${DOCFILE_EXT}
69 FOFILE:=${DOCFILE_BASE}.fo
70 PDFFILE:=${DOCFILE_BASE}.pdf
71 PSFILE:=${DOCFILE_BASE}.ps
72 DVIFILE:=${DOCFILE_BASE}.dvi
73 TXTFILE:=${DOCFILE_BASE}.txt
74 HTMLFILE:=${DOCFILE_BASE}.html
75 TMPFILES:=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log
76 DOCFILES:=$(shell echo *.xml *.xsl)
82 CATALOG:=`pwd`/catalog-${OS}.xml
83 CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1
96 @echo "Operating system detected: ${OS}"
102 html.tar.gz: $(DOCFILES) Makefile
105 @XML_CATALOG_FILES="$(CATALOG)" $(XSLTPROC) --stringparam chunker.output.encoding UTF-8 \
106 --xinclude --output html/ html_chunk.xsl $(DOCFILE)
107 @GZIP='-9' tar czf html.tar.gz html
112 ${FOFILE}: $(DOCFILES) Makefile
113 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --stringparam fop1.extensions 1 --output $(FOFILE) fo.xsl $(DOCFILE)
118 ${PDFFILE}: ${DOCFILES} Makefile
120 @fop $(FOFILE) -pdf $(PDFFILE) > /dev/null
128 ${PSFILE}: ${DOCFILES} Makefile
130 @fop $(FOFILE) -ps $(PSFILE) > /dev/null
136 ${TXTFILE}: ${FOFILE}
137 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output ${HTMLFILE} html.xsl $(DOCFILE)
138 lynx -dump ${HTMLFILE} > ${TXTFILE}
142 @rm -f *~ *.bak *.orig \#*\# .\#* texput.log
143 @rm -rf html ${PSFILE} ${HTMLFILE}
144 @rm -f ${TMPFILES} ${FOFILE}
145 @rm -f ${DVIFILE} ${TXTFILE}