#58 automating xsl/xhtml/Makefile

closed-wont-fix
XSL (122)
3
2006-04-27
2002-04-15
Anonymous
No

xsl/xhtml/Makefile can be automated using "static
pattern rules" which
is a GNU Make feature. If it is clear that GNU Make
shall be used
the file appended can be used as a replacement for
xsl/xhtml/Makefile.

Discussion

  • Logged In: NO

    There was a problem with file submission, so here is the
    file:

    ##
    ## Uses `static pattern rules'. Requires GNU make.
    ##

    include ../../cvstools/Makefile.incl

    .PHONY: all remove-old xsl-files clean

    HTML2XHTML := html2xhtml.xsl

    # stylesheets to be "generated"
    GENERATED_STYLESHEETS := profile-chunk.xsl
    profile-docbook.xsl

    # stylesheets to be "copied"
    STYLESHEETS := $(filter-out $(GENERATED_STYLESHEETS), \ $(notdir $(wildcard
    ../html/*.xsl)))

    # stylesheets to be removed
    OLD_STYLESHEETS := $(filter-out $(STYLESHEETS), $(wildcard
    *.xsl))
    OLD_STYLESHEETS := $(filter-out $(GENERATED_STYLESHEETS),
    $(OLD_STYLESHEETS))
    OLD_STYLESHEETS := $(filter-out $(HTML2XHTML),
    $(OLD_STYLESHEETS))

    all: xsl-files $(GENERATED_STYLESHEETS)

    xsl-files: remove-old $(STYLESHEETS)

    $(STYLESHEETS) : % : ../html/%
    $(XSLT) $< $(HTML2XHTML) $@

    $(GENERATED_STYLESHEETS) : profile-%.xsl : %.xsl
    ../profiling/xsl2profile.xsl
    $(XSLT) $+ $@

    remove-old:
    @rm -f $(OLD_STYLESHEETS)

    clean: remove-old
    @rm -f $(STYLESHEETS) $(GENERATED_STYLESHEETS)

     
    • labels: --> XSL
    • priority: 5 --> 3
     
  • Logged In: YES
    user_id=118135

    xhtml build is working already as expected;
    not compelling reason to change it at this point.

     
    • assigned_to: nobody --> xmldoc
    • status: open --> closed-wont-fix
     
  • Logged In: YES
    user_id=118135

    xhtml build is working already as expected;
    not compelling reason to change it at this point.