Newer
Older
XML / Makefile
  1. # $Id$
  2.  
  3.  
  4. # XSLT processor specific calling templates/functions:
  5. xalanc = Xalan $(4) -o $(3) $(1) $(2)
  6. xalanj = xalan $(4) $(1) $(2) > $(3)
  7. saxon = saxon -x org.apache.xml.resolver.tools.ResolvingXMLReader \
  8. -y org.apache.xml.resolver.tools.ResolvingXMLReader \
  9. -r org.apache.xml.resolver.tools.CatalogResolver \
  10. -o $(3) $(1) file:///$(2) $(4)
  11.  
  12. format = $(if $(findstring $(XSLT), 'xalan-c'), -p format "'$(1)'", $(if $(findstring $(XSLT), 'xalan-j'), -param format "'$(1)'", $(if $(findstring $(XSLT), 'saxon'), format=$(1))))
  13.  
  14. # Generic function for runnning the local preferred XSLT processor:
  15. 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)))))
  16.  
  17.  
  18. .PHONY: clean
  19.  
  20. all: xml2html.xsl xml2latex.xsl oracle-docs.xsl
  21.  
  22. clean:
  23. rm -f xml2html.xsl xml2latex.xsl oracle-docs.xsl
  24.  
  25. xml2html.xsl: format-master.xml xml2xslt.xsl oracle-docs.xsl Makefile
  26. $(call xslt,$<,xml2xslt.xsl,$@,$(call format,html))
  27.  
  28. xml2latex.xsl: format-master.xml xml2xslt.xsl oracle-docs.xsl Makefile
  29. $(call xslt,$<,xml2xslt.xsl,$@,$(call format,latex))
  30.  
  31. oracle-docs.xsl: oracle-docs.perl
  32. perl $< '.*' xslt > $@