X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=doc%2FMakefile;h=59a524b969407a1776cf1fd8b6b55ad91642db04;hb=bd6843e2084ce45d3d7b769e383c3cac589b5e93;hp=9da1bfd13db712841688ee52fb15a4c61c1253f8;hpb=d26a88bb2cbd2bf5b1430b2f54e11fef252787fe;p=clsql.git diff --git a/doc/Makefile b/doc/Makefile index 9da1bfd..59a524b 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,4 +1,5 @@ -############################################################################## +#!/usr/bin/make +############################################################################### # FILE IDENTIFICATION # # Name: Makefile @@ -6,14 +7,12 @@ # Programer: Kevin M. Rosenberg # Date Started: Mar 2002 # -# CVS Id: $Id$ -# -# This file, part of CLSQL, is Copyright (c) 2002-2003 by Kevin M. Rosenberg +# This file, part of CLSQL, is Copyright (c) 2002-2010 by Kevin M. Rosenberg # # CLSQL users are granted the rights to distribute and use this software # as governed by the terms of the Lisp Lesser GNU Public License # (http://opensource.franz.com/preamble.html), also known as the LLGPL. -############################################################################## +############################################################################### DOCFILE_BASE_DEFAULT:=clsql DOCFILE_EXT_DEFAULT:=xml @@ -21,23 +20,43 @@ DOCFILE_EXT_DEFAULT:=xml # Standard docfile processing -DEBIAN=$(shell expr "`cat /etc/issue`" : '.*Debian.*') -SUSE=$(shell expr "`cat /etc/issue`" : '.*SuSE.*') -REDHAT=$(shell expr "`cat /etc/issue`" : '.*RedHat.*') +DEBIAN=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Debian.*') +SUSE=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*SuSE.*') +SUSE91=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*SuSE Linux 9.1.*') +REDHAT=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Red Hat.*') +MANDRAKE=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Mandrake.*') +DARWIN=$(shell expr "`uname -a`" : '.*Darwin.*') +UBUNTU=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Ubuntu.*') + ifneq (${DEBIAN},0) OS:=debian else - ifneq (${SUSE},0) - OS=suse - else - ifneq (${REDHAT},0) - OS=redhat + ifneq (${SUSE91},0) + OS=suse91 + else + ifneq (${SUSE},0) + OS=suse + else + ifneq (${REDHAT},0) + OS=redhat + else + ifneq (${MANDRAKE},0) + OS=mandrake + else + ifneq (${DARWIN},0) + OS=darwin + else + ifneq (${UBUNTU},0) + OS:=debian + endif + endif + endif + endif endif endif endif - ifndef DOCFILE_BASE DOCFILE_BASE=${DOCFILE_BASE_DEFAULT} endif @@ -56,6 +75,10 @@ HTMLFILE:=${DOCFILE_BASE}.html TMPFILES:=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log DOCFILES:=$(shell echo *.xml *.xsl) +ifeq ($(XSLTPROC),) + XSLTPROC:=xsltproc +endif + CATALOG:=`pwd`/catalog-${OS}.xml CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1 @@ -79,14 +102,15 @@ html: html.tar.gz html.tar.gz: $(DOCFILES) Makefile @rm -rf html @mkdir html - @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output html/ html_chunk.xsl $(DOCFILE) + @XML_CATALOG_FILES="$(CATALOG)" $(XSLTPROC) --stringparam chunker.output.encoding UTF-8 \ + --xinclude --output html/ html_chunk.xsl $(DOCFILE) @GZIP='-9' tar czf html.tar.gz html .PHONY: fo fo: ${FOFILE} ${FOFILE}: $(DOCFILES) Makefile - @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output $(FOFILE) fo.xsl $(DOCFILE) + @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --stringparam fop1.extensions 1 --output $(FOFILE) fo.xsl $(DOCFILE) .PHONY: pdf pdf: ${PDFFILE}