X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=doc%2FMakefile;h=b5fad228f3efd312e6131367e27a29016480cabd;hb=3a618201c9f2370bb8784217a866d000371769e5;hp=69e7bfcc5219ade077a1ba4d6f10b7257e5024bf;hpb=bab58d17aebd5673d5d37085fb57768ced87ff1c;p=sbcl.git diff --git a/doc/Makefile b/doc/Makefile index 69e7bfc..b5fad22 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -1,26 +1,42 @@ -DOCFILE_BASE_DEFAULT:=user-manual -DOCFILE_EXT_DEFAULT:=xml - - -# Standard docfile processing +# Makefile for SBCL document generation -DEBIAN=$(shell expr "`cat /etc/issue`" : '.*Debian.*') -SUSE=$(shell expr "`cat /etc/issue`" : '.*SuSE.*') -REDHAT=$(shell expr "`cat /etc/issue`" : '.*RedHat.*') +# This file is part of the SBCL system. It was copied from UFFI and +# placed into the public domain by the original author, Kevin +# Rosenberg. +DOCFILE_BASE_DEFAULT:=user-manual +DOCFILE_EXT_DEFAULT:=xml -ifneq (${DEBIAN},0) -OS:=debian -else - ifneq (${SUSE},0) - OS=suse - else - ifneq (${REDHAT},0) - OS=redhat +SYSTEM:=$(shell uname) + +ifeq ($(SYSTEM),Linux) + ifneq ($(shell expr "`cat /etc/issue`" : '.*Debian.*'),0) + # Old Debian used /usr/share/sgml/docbook, new Debian uses + # /usr/share/xml/docbook. + ifneq ($(shell expr "`ls -d /usr/share/xml`" : '.*/usr/share/xml.*'),0) + OS:=debian + else + # Evidently it's not a new-style Debian DocBook setup, ergo: + OS:=debian-old + endif + else + ifneq ($(shell expr "`cat /etc/issue`" : '.*SuSE.*'),0) + OS=suse + else + ifneq ($(shell expr "`cat /etc/issue`" : 'Red Hat Linux release 9'),0) + OS=redhat9 + else + ifneq ($(shell expr "`cat /etc/issue`" : '.*Yarrow.*'),0) + OS=fedora1 + endif + endif endif endif endif +ifeq ($(SYSTEM),Darwin) + OS:=fink +endif ifndef DOCFILE_BASE DOCFILE_BASE=${DOCFILE_BASE_DEFAULT} @@ -44,7 +60,7 @@ ifeq ($(XSLTPROC),) XSLTPROC:=xsltproc endif -CATALOG:=`pwd`/catalog-${OS}.xml +CATALOG:=`pwd`/catalogs/catalog-${OS}.xml CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1 .PHONY: all