VirtualBox

Changeset 99068 in vbox for trunk


Ignore:
Timestamp:
Mar 20, 2023 1:23:57 PM (21 months ago)
Author:
vboxsync
Message:

manual/Makefile.kmk: Hacked up something to generate the single HTML. bugref:10302

File:
1 edited

Legend:

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

    r99065 r99068  
    780780 #
    781781
     782 ## @todo front page
    782783 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html: \
    783784                $(VBOX_USER_MANUAL_DITA_STAGED_FILES_en_US) \
     
    789790                "/transtype:xhtml" \
    790791                "/outdir:$(@D)" \
    791                 "/tempdir:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/temp_xhtml"
    792 
    793  # disable for now
    794  ## bird: Remove @chunk attrib from Glossary.dita topicref and add chunk="to-content" to bootmap for single html experiments.
    795  ##       See https://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/chunking.html
    796  ##       and https://www.oxygenxml.com/forum/post25114.html?hilit=dita%20xhtml%20chunk#p25114
    797  ##       for further clues.
    798  #html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
     792                "/tempdir:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/temp_xhtml_chunks"
     793
     794 html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
     795
     796 # We must modify UserManual.ditamap here, removing all chunk attributes and put
     797 # a chunk="to-content" on the root element (bookmap).  For clues see:
     798 #     https://docs.oasis-open.org/dita/v1.2/os/spec/archSpec/chunking.html
     799 #     https://www.oxygenxml.com/forum/post25114.html?hilit=dita%20xhtml%20chunk#p25114
     800 # We stich the index.html and UserManual-Single.html files together using
     801 # SED since we haven't been able to convince DITA-OT to combine them.
     802 ## @todo front page
     803 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html: \
     804                $(VBOX_USER_MANUAL_DITA_STAGED_FILES_en_US) \
     805                $(VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_en_US)
     806        $(call MSG_L1,Building html chunks $@)
     807        $(QUIET)$(RM) -Rf -- "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/"
     808        $(QUIET)$(RM) -f -- "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual-Single.ditamap"
     809        $(SED) -r -e 's/ chunk=["][^"]+["]//g' -e 's/<bookmap /<bookmap chunk="to-content" /' \
     810                --output "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual-Single.ditamap" \
     811                "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual.ditamap"
     812        $(QUIET)$(RM) -Rf -- "$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-html-single/"
     813        $(QUIET)$(call VBOX_DITA_RUN_DOST,$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-html-single) \
     814                "/i:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual-Single.ditamap" \
     815                "/transtype:xhtml" \
     816                "/outdir:$(@D)" \
     817                "/tempdir:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/temp_xhtml_single"
     818        $(SED) -ne '1,/<body>/{p}' \
     819                --output "$@" "$(@D)/UserManual-Single.html"
     820        $(APPEND) -n "$@" "<!-- index inject: -->"
     821        $(SED) -ne '/<body>/,/<\/body>/{/<body>/d;/<\/body>/d;s/UserManual-Single.html/UserManual.html/g;p}' \
     822                --append "$@" "$(@D)/index.html"
     823        $(APPEND) -n "$@" "<!-- resuming main file: -->"
     824        $(SED) -ne '/<body>/,99999999{/<body>/d;s/UserManual-Single.html/UserManual.html/g;p}' \
     825                --append "$@" "$(@D)/UserManual-Single.html"
     826
     827 html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
    799828
    800829 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip: \
    801                 $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
     830                $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html \
     831                $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-single/UserManual.html
    802832        $(call MSG_L1,Packing documentation $@)
    803833        $(QUIET)$(RM) -f $@
    804834        $(QUIET)$(REDIRECT) -C $(VBOX_PATH_MANUAL_OUTBASE)/en_US/ -- $(VBOX_ZIP) \
    805                 -9 -r "$@" "html-chunks"
    806 
    807  html:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/html-chunks/index.html
     835                -9 -r "$@" \
     836                "html-chunks" \
     837                "html-single" \
     838                -x "html-chunks/dita.list" \
     839                -x "html-chunks/dita.xml.properties" \
     840                -x "html-chunks/UserManual_xhtml.log" \
     841                -x "html-single/dita.list" \
     842                -x "html-single/dita.xml.properties" \
     843                -x "html-single/UserManual-Single_xhtml.log" \
     844                -x "html-single/index.html" \
     845                -x "html-single/UserManual-Single.html"
     846
    808847 html-zip:: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/UserManual.zip
    809848
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