Changeset 99571 in vbox for trunk/doc/manual
- Timestamp:
- May 3, 2023 1:34:42 AM (21 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/Makefile.kmk
r99516 r99571 141 141 $2 \ 142 142 -- $(ASH) $(VBOX_PATH_MANUAL_SRC)/dita-ot-copy-exec.sh "$(VBOX_DITA_ORIGINAL_PATH)" "$1" \ 143 -- $(VBOX_JAVA) -jar "$1/lib/dost.jar" "/ditadir:$1" $3 $4 # "/outercontrol:fail" ? 143 -- $(VBOX_JAVA) -jar "$1/lib/dost.jar" "/ditadir:$1" \ 144 $(if-expr defined(VBOX_DITA_DEBUG),"/cleantemp:no" "/debug:yes",) \ 145 $3 $4 # "/outercontrol:fail" ? 144 146 145 147 ifdef VBOX_DITA_USING_LATEST # Experiments with dita-ot v4.0.2. Requires java 17. 146 148 VBOX_DITA_USING_LATEST := 1 147 VBOX_JAVA_HOME := C:/Program Files/Java/jdk-17/ 148 VBOX_DITA_ORIGINAL_PATH := D:/Tmp/dita/dita-ot-4.0.2 149 ifeq ($(VBOX_JAVA17PLUS_HOME),) 150 VBOX_JAVA17PLUS_HOME := $(firstfile \ 151 $(rversortfiles $(qwildcard , $(KBUILD_DEVTOOLS_HST)/jdk/v1[789].* $(KBUILD_DEVTOOLS_HST)/jdk/v[2-9][0-9].* )) \ 152 $(rversortfiles $(qwildcard ,$(KBUILD_DEVTOOLS_HST_ALT)/jdk/v1[789].* $(KBUILD_DEVTOOLS_HST_ALT)/jdk/v[2-9][0-9].* )) \ 153 ) 154 endif 155 VBOX_DITA_ORIGINAL_PATH := $(firstfile $(rversortfiles $(qwildcard ,$(KBUILD_DEVTOOLS)/common/dita-ot/v[4-9].*)) \ 156 $(KBUILD_DEVTOOLS)/common/dita-ot/v4.0.2-r1) 157 149 158 VBOX_DITA_TECHNICAL_CONTENT_DTD_PATH = $(VBOX_DITA_ORIGINAL_PATH)/plugins/org.oasis-open.dita.v1_2/dtd/technicalContent/dtd 150 159 VBOX_DITA_CLASSPATH = \ 151 $(subst $(SP), ;,$(strip \160 $(subst $(SP),$(HOST_PATH_SEP),$(strip \ 152 161 $(VBOX_DITA_ORIGINAL_PATH)/lib/ant-launcher.jar \ 153 162 $(VBOX_DITA_ORIGINAL_PATH)/config \ … … 156 165 $(VBOX_DITA_ORIGINAL_PATH)/lib/*.jar \ 157 166 $(VBOX_DITA_ORIGINAL_PATH)/plugins/*/lib/*.jar))) 158 VBOX_DITA_RUN_DOST = $(REDIRECT ) \167 VBOX_DITA_RUN_DOST = $(REDIRECT_EXT) \ 159 168 -E 'ANT_HOME=$(VBOX_DITA_ORIGINAL_PATH)' \ 160 169 -E 'DITA_DIR=$(VBOX_DITA_ORIGINAL_PATH)' \ 161 -E 'JAVA_HOME=$(VBOX_JAVA _HOME)' \170 -E 'JAVA_HOME=$(VBOX_JAVA17PLUS_HOME)' \ 162 171 -E 'CLASSPATH=$(VBOX_DITA_CLASSPATH)' \ 163 172 $2 \ 164 173 -- \ 165 $(VBOX_JAVA )\174 $(VBOX_JAVA17PLUS_HOME)/bin/java \ 166 175 "-Djava.awt.headless=true" \ 167 176 "-Dsun.io.useCanonCaches=true" \ … … 172 181 -buildfile "$(VBOX_DITA_ORIGINAL_PATH)/build.xml" \ 173 182 -main "org.dita.dost.invoker.Main" \ 183 --args.grammar.cache=yes \ 184 --store-type=memory \ 174 185 $(patsubst "/i:%,"--input=%, \ 175 186 $(patsubst "/transtype:%,"--format=%, \ … … 178 189 $(patsubst "/filter:%,"--filter=%, \ 179 190 $(patsubst "/debug","--debug",$3)))))) \ 180 $5 --verbose --debug 191 $(if-expr defined(VBOX_DITA_DEBUG),"--clean.temp=no" "--debug",) \ 192 $5 --verbose 181 193 endif 182 194 … … 806 818 $$(VBOX_PATH_MANUAL_SRC)/pdf-theme-UserManual.yaml \ 807 819 $$(VBOX_PATH_MANUAL_SRC)/en_US/images/vboxlogo.png 820 $$(call MSG_L1,Building $@ ($(@D)/UserManual_pdf.log)) 808 821 $$(QUIET)$$(RM) -f -- "$$@" "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/UserManual_pdf.log" 809 822 $$(QUIET)$$(RM) -Rf -- "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita-ot-pdf/" … … 816 829 , \ 817 830 "/grammarcache:yes" \ 818 $(if-expr defined(VBOX_DITA_DEBUG),"/cleantemp:no" "/debug:yes",) \819 831 , \ 820 832 "--theme=$$(VBOX_PATH_MANUAL_SRC)/pdf-theme-UserManual.yaml" \ 821 833 "--logfile=$$(@D)/UserManual_pdf.log" \ 822 $(if-expr defined(VBOX_DITA_DEBUG),"--clean.temp=no",) \823 834 ) 824 835 … … 844 855 $(VBOX_USER_MANUAL_DITA_STAGED_FILES_en_US) \ 845 856 $(VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_en_US) 846 $(call MSG_L1,Building html chunks $@ )857 $(call MSG_L1,Building html chunks $@ ($(@D)/UserManual_xhtml.log)) 847 858 $(QUIET)$(RM) -Rf -- "$(@D)" "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-html-chunks/" 848 859 $(QUIET)$(MKDIR) -- "$(@D)" … … 856 867 "/grammarcache:yes" \ 857 868 , \ 858 "--logfile=$(@D)/UserManual_xhtml.log") 869 "--logfile=$(@D)/UserManual_xhtml.log" \ 870 ) 859 871 860 872 html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html … … 866 878 # We stich the index.html and UserManual-Single.html files together using 867 879 # SED since we haven't been able to convince DITA-OT to combine them. 880 # 881 ## @todo This is excruciatingly slow with 4.0.2 because of a preprocessing step 882 # (move-meta in the org.dita.base plugin) is doing 986 read+writes of 883 # the singled combined dita document (XML). This is probably the two 884 # for loops in the pushMetadata() method in 885 # src/main/java/org/dita/dost/module/MoveMetaModule.java. The netbeans 886 # profiler says that ouf 283 sec runtime, 64 secs are spent reading 887 # the xml big doc and 212 secs spent writing it out again (212+64=276). 888 # 889 # For the chunked version, the move-meta work is done on each .ditamap 890 # and .dita (topic) file instead, which is a lot less expensive. 891 # 892 # The problem is forced by the AbstractDomFilter.read() design, which 893 # reads XML to DOM, modifies DOM, writes out DOM as XML. The 894 # modifications done by the DitaMetaWriter.process function is 895 # restricted to a single topic, which is means this must be done this 896 # way. 897 # 898 # A workaround, though, would be to implement a custom cache that 899 # cache the document and doesn't write it to disk until the loops 900 # finishes. This could build on the CacheStore.java code, only 901 # potential challenge is to clone the job as the Job.store property is 902 # immutable. 903 # 868 904 ## @todo front page 869 905 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html: \ 870 906 $(VBOX_USER_MANUAL_DITA_STAGED_FILES_en_US) \ 871 907 $(VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_en_US) 872 $(call MSG_L1,Building html chunks $@ )908 $(call MSG_L1,Building html chunks $@ ($(@D)/UserManual-Single_xhtml.log)) 873 909 $(QUIET)$(RM) -f -- "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual-Single.ditamap" 874 910 $(SED) -r -e 's/ chunk=["][^"]+["]//g' -e 's/<bookmap /<bookmap chunk="to-content" /' \ … … 885 921 "/grammarcache:yes" \ 886 922 , \ 887 "--logfile=$(@D)/UserManual-Single_xhtml.log") 923 "--logfile=$(@D)/UserManual-Single_xhtml.log" \ 924 ) 888 925 $(SED) -ne '1,/<body>/{p}' \ 889 926 --output "$@" "$(@D)/UserManual-Single.html" … … 966 1003 # compilation step that produces the .chm-file, since we don't need it and it 967 1004 # mangles the path so it always fails anyway. 1005 # 1006 # HACK ALERT! Putting MSG_L1 between RM and MKDIR as the latter sometimes fails 1007 # on windows because the deleted directory still exists on Windows. 1008 # 1009 # HACK ALERT! For 4.0.2 we must set Ant property dita.output.dir to the output 1010 # dir to prevent the *.hhp+*.html+*.png files from being placed in 1011 # the temporary directory and removed upon completion (idea being 1012 # that hhc.exe had run and the files weren't needed any more - the 1013 # htmlhelp plugin sets temp.output.dir.name to 'temp_chm_dir'). 1014 # 968 1015 ## @todo front page. 969 1016 $(2)/UserManual.hhp: \ 970 1017 $(VBOX_USER_MANUAL_DITA_STAGED_FILES_$(1)) \ 971 1018 $(VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_$(1)) 972 $$(call MSG_L1,dita-ot-qhelp, => $$@)973 1019 $$(QUIET)$$(RM) -Rf -- "$$(@D)" "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita-ot-qhelp/" 1020 $$(call MSG_L1,dita-ot-qhelp, => $$@ ($(2)/UserManual_htmlhelp.log)) 974 1021 $$(QUIET)$$(MKDIR) -- "$$(@D)" 975 $$( QUIET)$$(call VBOX_DITA_RUN_DOST,$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita-ot-qhelp, -EHHCDIR="$$(@D)", \1022 $$(call VBOX_DITA_RUN_DOST,$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita-ot-qhelp, -EHHCDIR="$$(@D)", \ 976 1023 "/i:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/UserManual.ditamap" \ 977 1024 "/transtype:htmlhelp" \ … … 980 1027 "/tempdir:$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/temp_qhelp" \ 981 1028 , \ 982 "/grammarcache:yes" \ 983 , \ 984 "--logfile=$(2)/UserManual_htmlhelp.log") 1029 "/grammarcache:yes" \ 1030 , \ 1031 "--logfile=$(2)/UserManual_htmlhelp.log" \ 1032 "-Ddita.output.dir=$(2)" \ 1033 ) 985 1034 986 1035
Note:
See TracChangeset
for help on using the changeset viewer.