1 ##############################################################################
5 # Purpose: Makefile for the uffi documentation
6 # Programer: Kevin M. Rosenberg
7 # Date Started: Mar 2002
11 # This file, part of UFFI, is Copyright (c) 2002-2003 by Kevin M. Rosenberg
13 # UFFI 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:=uffi
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.*')
43 DOCFILE_BASE=${DOCFILE_BASE_DEFAULT}
47 DOCFILE_EXT=${DOCFILE_EXT_DEFAULT}
50 DOCFILE:=${DOCFILE_BASE}.${DOCFILE_EXT}
51 FOFILE:=${DOCFILE_BASE}.fo
52 PDFFILE:=${DOCFILE_BASE}.pdf
53 PSFILE:=${DOCFILE_BASE}.ps
54 DVIFILE:=${DOCFILE_BASE}.dvi
55 TXTFILE:=${DOCFILE_BASE}.txt
56 HTMLFILE:=${DOCFILE_BASE}.html
57 TMPFILES:=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log
58 DOCFILES:=$(shell echo *.xml *.xsl)
60 CATALOG:=`pwd`/catalog-${OS}.xml
61 CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1
74 @echo "Operating System Detected: ${OS}"
80 html.tar.gz: $(DOCFILES) Makefile
83 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output html/ html_chunk.xsl $(DOCFILE)
84 @GZIP='-9' tar czf html.tar.gz html
89 ${FOFILE}: $(DOCFILES) Makefile
90 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output $(FOFILE) fo.xsl $(DOCFILE)
95 ${PDFFILE}: ${DOCFILES} Makefile
97 @fop $(FOFILE) -pdf $(PDFFILE) > /dev/null
105 ${PSFILE}: ${DOCFILES} Makefile
107 @fop $(FOFILE) -ps $(PSFILE) > /dev/null
113 ${TXTFILE}: ${FOFILE}
114 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output ${HTMLFILE} html.xsl $(DOCFILE)
115 lynx -dump ${HTMLFILE} > ${TXTFILE}
119 @rm -f *~ *.bak *.orig \#*\# .\#* texput.log
120 @rm -rf html ${PSFILE} ${HTMLFILE}
121 @rm -f ${TMPFILES} ${FOFILE}
122 @rm -f ${DVIFILE} ${TXTFILE}