1 ##############################################################################
5 # Purpose: Makefile for the clsql documentation
6 # Programer: Kevin M. Rosenberg
7 # Date Started: Mar 2002
11 # This file, part of CLSQL, is Copyright (c) 2002-2003 by Kevin M. Rosenberg
13 # CLSQL users are granted the rights to distribute and use this software
14 # as governed by the terms of the Lisp Lesser GNU Public License
15 # (http://opensource.franz.com/preamble.html), also known as the LLGPL.
16 ##############################################################################
18 DOCFILE_BASE_DEFAULT:=clsql
19 DOCFILE_EXT_DEFAULT:=xml
22 # Standard docfile processing
24 DEBIAN=$(shell expr "`cat /etc/issue`" : '.*Debian.*')
25 SUSE=$(shell expr "`cat /etc/issue`" : '.*SuSE.*')
26 REDHAT=$(shell expr "`cat /etc/issue`" : '.*RedHat.*')
42 DOCFILE_BASE=${DOCFILE_BASE_DEFAULT}
46 DOCFILE_EXT=${DOCFILE_EXT_DEFAULT}
49 DOCFILE:=${DOCFILE_BASE}.${DOCFILE_EXT}
50 FOFILE:=${DOCFILE_BASE}.fo
51 PDFFILE:=${DOCFILE_BASE}.pdf
52 PSFILE:=${DOCFILE_BASE}.ps
53 DVIFILE:=${DOCFILE_BASE}.dvi
54 TXTFILE:=${DOCFILE_BASE}.txt
55 HTMLFILE:=${DOCFILE_BASE}.html
56 TMPFILES:=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log
57 DOCFILES:=$(shell echo *.xml *.xsl)
63 CATALOG:=`pwd`/catalog-${OS}.xml
64 CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1
77 @echo "Operating system detected: ${OS}"
83 html.tar.gz: $(DOCFILES) Makefile
86 @XML_CATALOG_FILES="$(CATALOG)" $(XSLTPROC) --stringparam chunker.output.encoding ISO-8859-1 \
87 --xinclude --output html/ html_chunk.xsl $(DOCFILE)
88 @GZIP='-9' tar czf html.tar.gz html
93 ${FOFILE}: $(DOCFILES) Makefile
94 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output $(FOFILE) fo.xsl $(DOCFILE)
99 ${PDFFILE}: ${DOCFILES} Makefile
101 @fop $(FOFILE) -pdf $(PDFFILE) > /dev/null
109 ${PSFILE}: ${DOCFILES} Makefile
111 @fop $(FOFILE) -ps $(PSFILE) > /dev/null
117 ${TXTFILE}: ${FOFILE}
118 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output ${HTMLFILE} html.xsl $(DOCFILE)
119 lynx -dump ${HTMLFILE} > ${TXTFILE}
123 @rm -f *~ *.bak *.orig \#*\# .\#* texput.log
124 @rm -rf html ${PSFILE} ${HTMLFILE}
125 @rm -f ${TMPFILES} ${FOFILE}
126 @rm -f ${DVIFILE} ${TXTFILE}