diff --git a/Makefile b/Makefile index 17a1b39..db0fee6 100755 --- a/Makefile +++ b/Makefile @@ -2,9 +2,11 @@ # XSLT processor specific calling templates/functions: -xalanc = Xalan -p format "'$(4)'" -o $(3) $(1) $(2) -xalanj = xalan -param format "'$(4)'" $(1) $(2) > $(3) -saxon = saxon $(1) $(2) format=$(4) > $(3) +xalanc = Xalan $(4) -o $(3) $(1) $(2) +xalanj = xalan $(4) $(1) $(2) > $(3) +saxon = saxon $(1) $(2) $(4) > $(3) + +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))))) @@ -18,10 +20,10 @@ rm -f xml2html.xsl xml2latex.xsl oracle-docs.xsl xml2html.xsl: format-master.xml xml2xslt.xsl oracle-docs.xsl Makefile - $(call xslt,$<,xml2xslt.xsl,$@,html) + $(call xslt,$<,xml2xslt.xsl,$@,$(call format,html)) xml2latex.xsl: format-master.xml xml2xslt.xsl oracle-docs.xsl Makefile - $(call xslt,$<,xml2xslt.xsl,$@,latex) + $(call xslt,$<,xml2xslt.xsl,$@,$(call format,latex)) oracle-docs.xsl: oracle-docs.perl perl $< '.*' xslt > $@