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 $(1) $(2) $(4) > $(3)
  8.  
  9. format = $(if $(findstring $(XSLT), 'xalan-c'), -p format "'$(1)'", $(if $(findstring $(XSLT), 'xalan-j'), -param format "'$(1)'", $(if $(findstring $(XSLT), 'saxon'), format=$(1))))
  10.  
  11. # Generic function for runnning the local preferred XSLT processor:
  12. 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)))))
  13.  
  14.  
  15. .PHONY: clean
  16.  
  17. all: xml2html.xsl xml2latex.xsl oracle-docs.xsl
  18.  
  19. clean:
  20. rm -f xml2html.xsl xml2latex.xsl oracle-docs.xsl
  21.  
  22. xml2html.xsl: format-master.xml xml2xslt.xsl oracle-docs.xsl Makefile
  23. $(call xslt,$<,xml2xslt.xsl,$@,$(call format,html))
  24.  
  25. xml2latex.xsl: format-master.xml xml2xslt.xsl oracle-docs.xsl Makefile
  26. $(call xslt,$<,xml2xslt.xsl,$@,$(call format,latex))
  27.  
  28. oracle-docs.xsl: oracle-docs.perl
  29. perl $< '.*' xslt > $@