- Timestamp:
- Mar 15, 2023 3:19:28 PM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/Makefile.kmk
r98987 r98991 490 490 endef 491 491 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_tex_to_pdf)) 492 endif # TO_BE_REMOVED 493 494 # Generate LaTeX from XML 495 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input. 496 define def_vbox_usermanual_xml_to_tex 497 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang) 498 $$(out_dir)/UserManual.tex: \ 499 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/$(lang)/,$$(VBOX_MANUAL_XML_FILES)) \ 500 $$(VBOX_MANUAL_XML_FILES_COMMON) \ 501 $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \ 502 $$(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \ 503 $$(if $$(VBOX_HAVE_XMLLINT),$$(out_dir)/validatemanual.run,) \ 504 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \ 505 $$(VBOX_XML_ENTITIES) $$(MAKEFILE_CURRENT) | $$$$(dir $$$$@) 492 493 # Generate LaTeX from XML 494 # Note: out_dir needs to be referenced with an escaped $ so it doesn't expand as eval expands it input. 495 define def_vbox_usermanual_xml_to_tex 496 local out_dir := $(VBOX_PATH_MANUAL_OUTBASE)/$(lang) 497 $$(out_dir)/UserManual.tex: \ 498 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/$(lang)/,$$(VBOX_MANUAL_XML_FILES)) \ 499 $$(VBOX_MANUAL_XML_FILES_COMMON) \ 500 $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \ 501 $$(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl \ 502 $$(if $$(VBOX_HAVE_XMLLINT),$$(out_dir)/validatemanual.run,) \ 503 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \ 504 $$(VBOX_XML_ENTITIES) $$(MAKEFILE_CURRENT) | $$$$(dir $$$$@) 506 505 $$(call MSG_TOOL,xsltproc $$(notdir $$(filter %.xsl,$$^)),,$$(firstword $$(filter %.xml,$$^)),$$@) 507 506 $$(QUIET)$$(RM) -f $$(addprefix $$(@D)/,$$(VBOX_MANUAL_LATEX_FILES_TARGET)) 508 # generate TeX source from processed docbook and store it in UserManual.tex.tmp;509 # pass current language to xsltproc in TARGETLANG variable507 # generate TeX source from processed docbook and store it in UserManual.tex.tmp; 508 # pass current language to xsltproc in TARGETLANG variable 510 509 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --stringparam TARGETLANG $(lang) \ 511 510 -o [email protected] $$(VBOX_PATH_MANUAL_SRC)/docbook2latex.xsl $$< 512 # for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word;513 # the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections511 # for pretty quotes, replace " with `` or '' depending on whether it's at the start of a word; 512 # the \QUOTE{} was inserted by docbook2latex.xsl for all quotes _outside_ of screen sections 514 513 $$(QUIET)$$(SED) \ 515 514 -e 's|^\\QUOTE{}|\\OQ{}|g' \ … … 518 517 --output $$@ [email protected] 519 518 $$(QUIET)$$(RM) -f [email protected] 520 endef521 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_xml_to_tex))522 519 endef 520 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_usermanual_xml_to_tex)) 521 endif # TO_BE_REMOVED 523 522 # Useful aliases 524 523 usermanual UserManual.pdf:: $(PATH_STAGE_BIN)/UserManual.pdf … … 527 526 $(MAKE) --pretty-command-printing -j1 VBOX_PDFLATEX_INTERACTION=errorstopmode $(PATH_STAGE_BIN)/UserManual.pdf 528 527 529 # 530 # Generate rules for validating the UserManual.xml. These are invoked 531 # automatically at build time, but can also be manually invoked via the 532 # 'validatemanual' and 'validatemanual_<lang>' aliases. 533 # 534 define def_vbox_validate_xml 535 validatemanual_$(lang):: $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/validatemanual.run 536 $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/validatemanual.run: \ 537 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/$(lang)/,$$(VBOX_MANUAL_XML_FILES)) \ 538 $$(VBOX_MANUAL_XML_FILES_COMMON) \ 539 $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \ 540 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \ 541 $$(VBOX_XML_ENTITIES) $$(MAKEFILE_CURRENT) | $$$$(dir $$$$@) 528 ifdef TO_BE_REMOVED 529 # 530 # Generate rules for validating the UserManual.xml. These are invoked 531 # automatically at build time, but can also be manually invoked via the 532 # 'validatemanual' and 'validatemanual_<lang>' aliases. 533 # 534 define def_vbox_validate_xml 535 validatemanual_$(lang):: $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/validatemanual.run 536 $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/validatemanual.run: \ 537 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/$(lang)/,$$(VBOX_MANUAL_XML_FILES)) \ 538 $$(VBOX_MANUAL_XML_FILES_COMMON) \ 539 $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \ 540 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \ 541 $$(VBOX_XML_ENTITIES) $$(MAKEFILE_CURRENT) | $$$$(dir $$$$@) 542 542 $$(call MSG_L1,Validating $$<) 543 543 $$(QUIET)$$(VBOX_XMLLINT_WITH_CAT) --dtdvalid $$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd $$< 544 544 $$(QUIET)$$(APPEND) -t "$$@" "done" 545 endef546 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_validate_xml))547 548 549 # Handy aliases.550 validatemanual:: $(foreach lang,$(VBOX_MANUAL_LANGUAGES),validatemanual_$(lang))551 545 endef 546 $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_validate_xml)) 547 548 549 # Handy aliases. 550 validatemanual:: $(foreach lang,$(VBOX_MANUAL_LANGUAGES),validatemanual_$(lang)) 551 endif # TO_BE_REMOVED 552 552 553 553 … … 858 858 859 859 VBOX_REFENTRY_DITA_FILES = $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file, $(basename $(VBOX_MANUAL_XML_REFENTRY_FILES)) \ 860 man_vboximg-mount man_VBoxHeadless user_isomakercmd-man \860 man_vboximg-mount man_VBoxHeadless user_isomakercmd-man \ 861 861 ,$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/dita/topics/$(file).dita)) 862 862 863 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/topics/user_isomakercmd-man.dita: \864 $(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl \865 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_isomakercmd-man.xml | $$$(dir $$$@)863 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/topics/user_isomakercmd-man.dita: \ 864 $(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl \ 865 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_isomakercmd-man.xml | $$$(dir $$$@) 866 866 $(QUIET)$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output $@ $(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl $(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_isomakercmd-man.xml 867 867 … … 899 899 ditamap-to-pdf: $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/UserManual.pdf 900 900 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/UserManual.pdf: \ 901 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/$(lang)/,$$(VBOX_MANUAL_XML_FILES)) \902 901 $$(VBOX_MANUAL_XML_FILES_COMMON) \ 903 902 $$(VBOX_MANUAL_XML_FILES_GENERATED_$(lang)) \
Note:
See TracChangeset
for help on using the changeset viewer.