X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=doc%2FMakefile;h=474bff4c5b1b0bae51fa22e0906bd2ba7a442e09;hb=12a49f5a9fe3d4f2a8096d5d0676b21700b8b1d8;hp=8d61e2b792c79b186f39b8c8b7ea1132dc1d3ed6;hpb=7eb3af145e05fea52bdd54c4da8739e3d71a6528;p=uffi.git diff --git a/doc/Makefile b/doc/Makefile index 8d61e2b..474bff4 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -8,19 +8,51 @@ # # CVS Id: $Id$ # -# This file, part of UFFI, is Copyright (c) 2002-2003 by Kevin M. Rosenberg -# -# UFFI 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. +# This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg ############################################################################## -OS:=debian DOCFILE_BASE_DEFAULT:=uffi DOCFILE_EXT_DEFAULT:=xml + # Standard docfile processing +DEBIAN=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Debian.*') +UBUNTU=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Ubuntu.*') +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.*') + +ifneq (${DEBIAN},0) +OS:=debian +else + 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=ubuntu + endif + endif + endif + endif + endif + endif +endif + ifndef DOCFILE_BASE DOCFILE_BASE=${DOCFILE_BASE_DEFAULT} endif @@ -39,6 +71,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 @@ -53,6 +89,7 @@ doc: html pdf .PHONY: check check: + @echo "Operating System Detected: ${OS}" @$(CHECK) .PHONY: html @@ -61,7 +98,8 @@ 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