diff --git a/Makefile b/Makefile index e8e8b4e..af467a4 100755 --- a/Makefile +++ b/Makefile @@ -1,32 +1,37 @@ -# $Id$ +################################################################################ +# +# File: $Id$ +# +# Makefile for building the INFO database courses XML formatting stylsheets. +# (We really need a better name :) +# +################################################################################ -# XSLT processor specific calling templates/functions: -xalanc = Xalan $(4) -o $(3) $(1) $(2) -xalanj = xalan $(4) $(1) $(2) > $(3) -saxon = saxon -x org.apache.xml.resolver.tools.ResolvingXMLReader \ - -y org.apache.xml.resolver.tools.ResolvingXMLReader \ - -r org.apache.xml.resolver.tools.CatalogResolver \ - -o $(3) $(1) file:///$(2) $(4) - -format = $(if $(findstring $(XSLT), 'xalan-c'), -p format "'$(1)'", $(if $(findstring $(XSLT), 'xalan-j'), -param format "'$(1)'", $(if $(findstring $(XSLT), 'saxon'), format=$(1)))) - -# Generic function for runnning the local preferred XSLT processor: -xslt = $(if $(findstring $(XSLT), 'xalan-c'), $(call xalanc,$(1),$(2),$(3),$(4)), $(if $(findstring $(XSLT), 'xalan-j'), $(call xalanj,$(1),$(2),$(3),$(4)), $(if $(findstring $(XSLT), 'saxon'), $(call saxon,$(1),$(2),$(3),$(4))))) +SHELL=/bin/sh -.PHONY: clean +################################################################################ +# +# Include the XSLT processing functions. Note that we are assuming a fixed +# path relative to the current directory! +# +include ../Handbook/make-includes/xslt_functions.make + + +.PHONY: all clean + all: xml2html.xsl xml2latex.xsl oracle-docs.xsl -clean: - rm -f xml2html.xsl xml2latex.xsl oracle-docs.xsl -xml2html.xsl: format-master.xml xml2xslt.xsl oracle-docs.xsl Makefile - $(call xslt,$<,xml2xslt.xsl,$@,$(call format,html)) +xml2html.xsl xml2latex.xsl: format-master.xml xml2xslt.xsl oracle-docs.xsl Makefile + $(call xslt,$<,xml2xslt.xsl,$(call xslt_parameter,format,$(@:xml2%.xsl=%))) > $@ -xml2latex.xsl: format-master.xml xml2xslt.xsl oracle-docs.xsl Makefile - $(call xslt,$<,xml2xslt.xsl,$@,$(call format,latex)) oracle-docs.xsl: oracle-docs.perl perl $< '.*' xslt > $@ + + +clean: + rm -f xml2html.xsl xml2latex.xsl oracle-docs.xsl