VirtualBox

Changeset 56543 in vbox for trunk/doc


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

Makefile tinkering.

File:
1 edited

Legend:

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

    r56542 r56543  
    149149# $(evalcall2 def_vbox_replace_paths_in_xslt)
    150150# @param    1   The XSLT source file (relative to Makefile dir).
    151 # @param    2   Optional output subdirectory.
     151# @param    2   Optional output subdirectory (leading slash).
    152152define def_vbox_replace_paths_in_xslt
    153 OTHER_CLEAN += $$(VBOX_PATH_MANUAL_OUTBASE)/$2$(notdir $1)
    154 $$(VBOX_PATH_MANUAL_OUTBASE)/$2$(notdir $1): $$(VBOX_PATH_MANUAL_SRC)/$1 | $$$$(dir $$$$@)
    155         $$(call MSG_GENERATE,,$$@,$$<)
     153OTHER_CLEAN += $$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1)
     154$$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1): $$(VBOX_PATH_MANUAL_SRC)/$1 | $$$$(dir $$$$@)
     155        $$(call MSG_L1,Pre-processing $$(<) to $$(@))
    156156        $$(QUIET)$$(SED) \
    157157                -e 's|@VBOX_PATH_DOCBOOK@|$$(VBOX_PATH_DOCBOOK)|g' \
    158158                -e 's|@VBOX_PATH_MANUAL_SRC@|$$(VBOX_PATH_MANUAL_SRC)|g' \
    159159                -e 's|@VBOX_PATH_MANUAL_OUTBASE@|$$(VBOX_PATH_MANUAL_OUTBASE)|g' \
    160                 -e 's|@VBOX_PATH_MANUAL_OUT_LANG@|$$(VBOX_PATH_MANUAL_OUTBASE)$(if $2,/$(patsubst %/,%,$2),)|g' \
    161                 \
    162                 -e 's|@CFGPATH@|$$(VBOX_PATH_MANUAL_SRC)|g' \
    163                 -e 's|@TARGETPATH@|$$(@D)|g' \
     160                -e 's|@VBOX_PATH_MANUAL_OUT_LANG@|$$(VBOX_PATH_MANUAL_OUTBASE)$2|g' \
    164161                --output "$$(@)" $$<
    165162endef
    166163
     164##
     165# Non-pattern-rule approach to editing XML files.
     166# $(evalcall2 def_vbox_replace_stuff_in_xml)
     167# @param    1   The XSLT source file (relative to Makefile dir).
     168# @param    2   Optional output subdirectory (leading slash).
     169#
     170define def_vbox_replace_stuff_in_xml
     171OTHER_CLEAN += $$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1)
     172$$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1): $$(VBOX_PATH_MANUAL_SRC)/$1 $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
     173        $$(call MSG_L1,Pre-processing $$(<) to $$(@))
     174        $$(QUIET)$$(SED) \
     175                -e 's|@VBOX_PATH_DOCBOOK@|$$(VBOX_PATH_DOCBOOK)|g' \
     176                -e 's|@VBOX_PATH_MANUAL_SRC@|$$(VBOX_PATH_MANUAL_SRC)|g' \
     177                -e 's|@VBOX_PATH_MANUAL_OUTBASE@|$$(VBOX_PATH_MANUAL_OUTBASE)|g' \
     178                -e 's|@VBOX_PATH_MANUAL_OUT_LANG@|$$(VBOX_PATH_MANUAL_OUTBASE)$2|g' \
     179               \
     180                -e 's/@VBOX_VERSION_MAJOR@/$$(VBOX_VERSION_MAJOR)/g' \
     181                -e 's/@VBOX_VERSION_MINOR@/$$(VBOX_VERSION_MINOR)/g' \
     182                -e 's/@VBOX_VERSION_BUILD@/$$(VBOX_VERSION_BUILD)/g' \
     183                -e 's/@VBOX_VERSION_STRING@/$$(VBOX_VERSION_STRING)/g' \
     184                -e 's/@VBOX_VENDOR@/$$(VBOX_VENDOR)/g' \
     185                -e 's/@VBOX_PRODUCT@/$$(VBOX_PRODUCT)/g' \
     186                -e 's/@VBOX_C_YEAR@/$$(VBOX_C_YEAR)/g' \
     187               \
     188                --output "$$(@)" $$<
     189endef
    167190
    168191## List of refentry files (manpages).
     
    431454
    432455# intermediate step to do some variable replacement in the document
    433 $(foreach f,$(VBOX_MANUAL_LANGUAGES) \
    434 ,$(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/$f/,$(filter-out user_VBoxManage.xml,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)))): \
    435                 $(VBOX_PATH_MANUAL_OUTBASE)/% : $(VBOX_PATH_MANUAL_SRC)/% $(VBOX_VERSION_STAMP) | $$(dir $$@)
    436         $(call MSG_L1,Pre-processing [1] $(@F) to $@)
    437         $(QUIET)$(RM) -f $@ [email protected]
    438         $(QUIET)$(SED) -e 's/@VBOX_VERSION_MAJOR@/$(VBOX_VERSION_MAJOR)/g' \
    439                        -e 's/@VBOX_VERSION_MINOR@/$(VBOX_VERSION_MINOR)/g' \
    440                        -e 's/@VBOX_VERSION_BUILD@/$(VBOX_VERSION_BUILD)/g' \
    441                        -e 's/@VBOX_VERSION_STRING@/$(VBOX_VERSION_STRING)/g' \
    442                        -e 's/@VBOX_VENDOR@/$(VBOX_VENDOR)/g' \
    443                        -e 's/@VBOX_PRODUCT@/$(VBOX_PRODUCT)/g' \
    444                        -e 's/@VBOX_C_YEAR@/$(VBOX_C_YEAR)/g' \
    445                        -e 's|@VBOX_PATH_MANUAL_SRC@|$(VBOX_PATH_MANUAL_SRC)|g' \
    446                        --output [email protected] $<
    447         $(QUIET)$(MV) -f [email protected] $@
     456$(foreach lang,$(VBOX_MANUAL_LANGUAGES) \
     457,$(foreach file,$(filter-out user_VBoxManage.xml,$(VBOX_MANUAL_XML_FILES_INCL_CHANGELOG)) \
     458,$(evalcall2 def_vbox_replace_stuff_in_xml,/$(lang)/$(file),/$(lang))))
    448459
    449460# TODO: figure why the rule below doesn't cause kmk to rebuild the manual when a man page changes!
     
    735746 # Microsoft Help Compiler.
    736747 #
    737  $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-htmlhelp-formatcfg.xsl,$(lang)/))
     748 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-htmlhelp-formatcfg.xsl,/$(lang)))
    738749
    739750 # Manual formatcfg dependencies for the above.
     
    810821#
    811822##########################################################################################
    812 $(evalcall2 def_vbox_replace_paths_in_xslt,docbook-html-one-page-formatcfg.xsl,en_US/)
    813 $(evalcall2 def_vbox_replace_paths_in_xslt,docbook-html-chunks-formatcfg.xsl,en_US/)
     823$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-html-one-page-formatcfg.xsl,/en_US)
     824$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-html-chunks-formatcfg.xsl,/en_US)
    814825
    815826# Manual formatcfg dependencies.
     
    867878# with the actual change log contained in user_ChangeLogImpl.xml
    868879#
    869 $(evalcall2 def_vbox_replace_paths_in_xslt,docbook-changelog-formatcfg.xsl,en_US/)
     880$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-changelog-formatcfg.xsl,/en_US)
    870881$(VBOX_PATH_MANUAL_OUTBASE)/en_US/ChangeLog.html: \
    871882                $(VBOX_PATH_MANUAL_OUTBASE)/en_US/docbook-changelog-formatcfg.xsl \
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