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=expr "`cat /etc/issue`" : '.*Debian.*'
25 SUSE=expr "`cat /etc/issue`" : '.*SuSE.*'
26 REDHAT=expr "`cat /etc/issue`" : '.*RedHat.*'
41 DOCFILE_BASE=${DOCFILE_BASE_DEFAULT}
45 DOCFILE_EXT=${DOCFILE_EXT_DEFAULT}
48 DOCFILE:=${DOCFILE_BASE}.${DOCFILE_EXT}
49 FOFILE:=${DOCFILE_BASE}.fo
50 PDFFILE:=${DOCFILE_BASE}.pdf
51 PSFILE:=${DOCFILE_BASE}.ps
52 DVIFILE:=${DOCFILE_BASE}.dvi
53 TXTFILE:=${DOCFILE_BASE}.txt
54 HTMLFILE:=${DOCFILE_BASE}.html
55 TMPFILES:=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log
56 DOCFILES:=$(shell echo *.xml *.xsl)
58 CATALOG:=`pwd`/catalog-${OS}.xml
59 CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1
77 html.tar.gz: $(DOCFILES) Makefile
80 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output html/ html_chunk.xsl $(DOCFILE)
81 @GZIP='-9' tar czf html.tar.gz html
86 ${FOFILE}: $(DOCFILES) Makefile
87 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output $(FOFILE) fo.xsl $(DOCFILE)
92 ${PDFFILE}: ${DOCFILES} Makefile
94 @fop $(FOFILE) -pdf $(PDFFILE) > /dev/null
102 ${PSFILE}: ${DOCFILES} Makefile
104 @fop $(FOFILE) -ps $(PSFILE) > /dev/null
110 ${TXTFILE}: ${FOFILE}
111 @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output ${HTMLFILE} html.xsl $(DOCFILE)
112 lynx -dump ${HTMLFILE} > ${TXTFILE}
116 @rm -f *~ *.bak *.orig \#*\# .\#* texput.log
117 @rm -rf html ${PSFILE} ${HTMLFILE}
118 @rm -f ${TMPFILES} ${FOFILE}
119 @rm -f ${DVIFILE} ${TXTFILE}