VirtualBox

Changeset 56542 in vbox for trunk/doc


Ignore:
Timestamp:
Jun 18, 2015 8:08:45 PM (9 years ago)
Author:
vboxsync
Message:

Use xi:include instead of SED for including user_ChangeLogImpl.xml into user_ChangeLog.xml.

Location:
trunk/doc/manual
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/Makefile.kmk

    r56541 r56542  
    426426#       $(QUIET)$(INSTALL) -m 0644 $< $@
    427427
     428# Manual dependency on user_ChangeLogImpl.xml
     429$(foreach lang,$(VBOX_MANUAL_LANGUAGES) \
     430,$(eval $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_ChangeLog.xml: $(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml))
     431
    428432# intermediate step to do some variable replacement in the document
    429 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(filter-out user_VBoxManage.xml,$(VBOX_MANUAL_XML_FILES)))): \
     433$(foreach f,$(VBOX_MANUAL_LANGUAGES) \
     434,$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(filter-out user_VBoxManage.xml,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)))): \
    430435                $(VBOX_PATH_MANUAL_OUTBASE)/% : $(VBOX_PATH_MANUAL_SRC)/% $(VBOX_VERSION_STAMP) | $$(dir $$@)
    431436        $(call MSG_L1,Pre-processing [1] $(@F) to $@)
     
    438443                       -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
    439444                       -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
     445                       -e 's|@VBOX_PATH_MANUAL_SRC@|$(VBOX_PATH_MANUAL_SRC)|g' \
    440446                       --output [email protected] $<
    441447        $(QUIET)$(MV) -f [email protected] $@
    442 
    443 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/user_ChangeLog.xml): \
    444                 $(VBOX_PATH_MANUAL_OUTBASE)/% : \
    445                 $(VBOX_PATH_MANUAL_SRC)/% $(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml | $$(dir $$@)
    446         $(call MSG_L1,Pre-processing [3] $(@F) to $@)
    447         $(QUIET)$(RM) -f $@ [email protected] [email protected]
    448         $(QUIET)$(SED) -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
    449                        -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
    450                        -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
    451                        -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
    452                        -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
    453                        -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
    454                        -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
    455                        --output [email protected] $<
    456         $(QUIET)$(SED) -e '1,/<!--@VIRTUALBOX_CHANGELOG_IMPL@-->/!d' \
    457                        -e 's/<!--@VIRTUALBOX_CHANGELOG_IMPL@-->//' \
    458                        --output $@ [email protected]
    459         var=`$(SED) -n '/!--@VIRTUALBOX_CHANGELOG_IMPL@-->/p' $<`; \
    460                 test -n "$${var}" \
    461                 && $(SED) -e 's/<?xml version=\"1.0\" encoding=\"UTF-8\"?>//g' \
    462                         --append $@ $(VBOX_PATH_MANUAL_SRC)/user_ChangeLogImpl.xml; \
    463         true
    464         $(QUIET)$(SED) -e '/<!--@VIRTUALBOX_CHANGELOG_IMPL@-->/,$$!d' \
    465                        -e 's/<!--@VIRTUALBOX_CHANGELOG_IMPL@-->//' --append $@ [email protected]
    466         $(QUIET)$(RM) -f -- "[email protected]"
    467448
    468449# TODO: figure why the rule below doesn't cause kmk to rebuild the manual when a man page changes!
     
    524505                $$(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
    525506                $$(VBOX_VERSION_STAMP) | $$(dir $$@)
    526         $$(call MSG_GENERATE,,$$@,$$<)
     507        $$(call MSG_TOOL,xsltproc $$(notdir $$(filter %.xsl,$$^)),,$$(filter %.xml,$$^),$$@)
    527508        $$(QUIET)$$(RM) -f "$$@"
    528509        $$(QUIET)$$(VBOX_XSLTPROC_WITH_CAT) --output $$@ $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl $$<
     
    539520                $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
    540521               | $$(dir $$@)
    541         $(call MSG_GENERATE,,$@,$(filter %.xml,$^))
     522        $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
    542523        $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --output "$@" $< $(filter %.xml,$^)
    543524
     
    624605                $(if $(VBOX_HAVE_XMLLINT),$(VBOX_PATH_MANUAL_OUTBASE)/%/validatemanual.run,) \
    625606                $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE_CURRENT)
    626         $(call MSG_L1,Generating $@ from DocBook XML)
     607        $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
    627608        $(QUIET)$(RM) -f $(addprefix $(@D)/,$(VBOX_MANUAL_LATEX_FILES_TARGET))
    628609#   generate TeX source from processed docbook and store it in UserManual.tex.tmp;
     
    709690                $(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \
    710691                $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE_CURRENT) | $$(dir $$@)
    711         $(call MSG_L1,Generating $@ from DocBook XML)
     692        $(call MSG_TOOL,xsltproc $(notdir $(filter %.xsl,$^)),,$(firstword $(filter %.xml,$^)),$@)
    712693        $(QUIET)$(RM) -f $(addprefix $(@D/),$(VBOX_SDKREF_LATEX_FILES_TARGET))
    713694#       generate TeX source from processed docbook and store it in SDKRef.tex.tmp
     
    794775                $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/%/,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)) \
    795776                $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK)
    796         $(call MSG_L1,xsltproc $<,=> $@)
     777        $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
    797778        $(QUIET)$(RM) -f $@
    798779        $(QUIET)$(MKDIR) -p $(@D)
     
    845826                $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
    846827                | $$(dir $$@)
    847         $(call MSG_L1,xsltproc $<)
     828        $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
    848829        $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) \
    849830                --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html \
     
    858839                $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
    859840                | $$(dir $$@)
    860         $(call MSG_L1,xsltproc $<)
     841        $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
    861842        $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) \
    862843                --output $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html \
     
    891872                $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_ChangeLog.xml \
    892873                $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) | $$(dir $$@)
     874        $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(firstword $(filter %.xml,$^)),$@)
    893875        $(QUIET)$(VBOX_XSLTPROC_WITH_CAT) --output "$@" "$<" $(filter %.xml,$^)
    894876        $(call MSG_L1,Fresh ChangeLog.html is now at $@)
     
    918900                $$(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
    919901                $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
    920         $$(call MSG_GENERATE,,$$@,$$<)
     902        $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
    921903        $$(QUIET)$$(RM) -f "$$@"
    922904        $$(QUIET)$$(VBOX_XSLTPROC_WITH_CAT) --output $$@ \
     
    931913                $$(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
    932914                $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
    933         $$(call MSG_GENERATE,,$$@,$$<)
     915        $$(call MSG_TOOL,xsltproc $$(notdir $$(firstword $$(filter %.xsl,$$^))),,$$(firstword $$(filter %.xml,$$^)),$$@)
    934916        $$(QUIET)$$(RM) -f "$$@"
    935917        $$(QUIET)$$(VBOX_XSLTPROC_WITH_CAT) --output $$@ $$(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-manpage.xsl $$<
     
    968950                $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
    969951                $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
    970         $(call MSG_GENERATE,,$@,$<)
     952        $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$@)
    971953        $(QUIET)$(APPEND) -tn "$@" \
    972954                '/* Autogenerated by $<, do not edit! */' \
     
    991973                $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
    992974                $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
    993         $(call MSG_GENERATE,,$@,$<)
     975        $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$@)
    994976        $(QUIET)$(APPEND) -tn "$@" \
    995977                '/* Autogenerated by $<, do not edit! */' \
  • trunk/doc/manual/en_US/user_ChangeLog.xml

    r56541 r56542  
    1414  In addition, each build contains a revision number.</para>
    1515
    16 <!--@VIRTUALBOX_CHANGELOG_IMPL@-->
     16  <xi:include href="@VBOX_PATH_MANUAL_SRC@/user_ChangeLogImpl.xml" xpointer="xpointer(/chapter/*)"
     17    xmlns:xi="http://www.w3.org/2001/XInclude" />
    1718
    1819  <sect1>
  • trunk/doc/manual/user_ChangeLogImpl.xml

    r56194 r56542  
    11<?xml version="1.0" encoding="UTF-8"?>
    22
     3<chapter> <!-- HACK ALERT! Seems we must have a single top level element for xi:include to work.
     4                           So, we use chapter and xpointer="xpointer(/chapter/)" with xi:include. -->
    35  <sect1>
    46    <title>Version 5.0.0 Release Candidate 1 (2015-06-01)</title>
     
    1242412426
    1242512427  </sect1>
    12426 
     12428</chapter>
     12429
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette