Index: /trunk/doc/manual/Makefile.kmk
===================================================================
--- /trunk/doc/manual/Makefile.kmk	(revision 56535)
+++ /trunk/doc/manual/Makefile.kmk	(revision 56536)
@@ -158,4 +158,5 @@
 		-e 's|@VBOX_PATH_MANUAL_SRC@|$$(VBOX_PATH_MANUAL_SRC)|g' \
 		-e 's|@VBOX_PATH_MANUAL_OUTBASE@|$$(VBOX_PATH_MANUAL_OUTBASE)|g' \
+		-e 's|@VBOX_PATH_MANUAL_OUT_LANG@|$$(VBOX_PATH_MANUAL_OUTBASE)$(if $2,/$(patsubst %/,%,$2),)|g' \
 		\
 		-e 's|@CFGPATH@|$$(VBOX_PATH_MANUAL_SRC)|g' \
@@ -755,4 +756,11 @@
  # Microsoft Help Compiler.
  #
+ $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(evalcall2 def_vbox_replace_paths_in_xslt,docbook-htmlhelp-formatcfg.xsl,$(lang)/))
+
+ # Manual formatcfg dependencies for the above.
+ $(foreach lang,$(VBOX_MANUAL_LANGUAGES), $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/docbook-htmlhelp-formatcfg.xsl): \
+ 	$(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
+ 	$(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
+
  $(PATH_STAGE_BIN)/VirtualBox.chm: $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.chm
 	$(QUIET)$(CP) $< $@
@@ -772,19 +780,4 @@
 	$(QUIET)$(VBOX_HHC) $(subst /,\\,$<)
 
-
- # intermediate step to do some variable replacement in the XSL configuration
- $(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/docbook-htmlhelp-formatcfg.xsl): \
-		$(VBOX_PATH_MANUAL_SRC)/docbook-htmlhelp-formatcfg.xsl $(MAKEFILE_CURRENT) | $$(dir $$@)
-	$(call MSG_GENERATE,,$@,$<)
-	$(QUIET)$(RM) -f $@
-	$(QUIET)$(SED) -e 's|\$$DOCBOOKPATH|$(VBOX_PATH_DOCBOOK)|g' \
-	               -e 's|\$$CFGPATH|$(VBOX_PATH_MANUAL_SRC)|g' \
-	               -e 's|\$$TARGETPATH|$(@D)|g' --output $@ $<
-
- # Manual formatcfg dependencies.
- $(foreach lang,$(VBOX_MANUAL_LANGUAGES), $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/docbook-htmlhelp-formatcfg.xsl): \
- 	$(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl \
- 	$(VBOX_PATH_MANUAL_SRC)/common-html-formatcfg.xsl
-
  # Prepare the XSL file for our title page, htmlhelp variant.
  $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/titlepage-htmlhelp.xsl): \
@@ -794,5 +787,4 @@
 	$(QUIET)$(VBOX_XSLTPROC) --xinclude --nonet -o $@.tmp $(VBOX_PATH_DOCBOOK)/template/titlepage.xsl $<
 	$(QUIET)$(MV) -f $@.tmp $@
-
 
  $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/HTMLHelp/htmlhelp.hhp): \
Index: /trunk/doc/manual/docbook-htmlhelp-formatcfg.xsl
===================================================================
--- /trunk/doc/manual/docbook-htmlhelp-formatcfg.xsl	(revision 56535)
+++ /trunk/doc/manual/docbook-htmlhelp-formatcfg.xsl	(revision 56536)
@@ -2,9 +2,9 @@
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 
-<xsl:import href="$DOCBOOKPATH/htmlhelp/htmlhelp.xsl"/>
-<xsl:import href="$CFGPATH/common-formatcfg.xsl"/>
-<xsl:import href="$CFGPATH/common-html-formatcfg.xsl"/>
+<xsl:import href="@VBOX_PATH_DOCBOOK@/htmlhelp/htmlhelp.xsl"/>
+<xsl:import href="@VBOX_PATH_MANUAL_SRC@/common-formatcfg.xsl"/>
+<xsl:import href="@VBOX_PATH_MANUAL_SRC@/common-html-formatcfg.xsl"/>
 
-<xsl:include href="$TARGETPATH/titlepage-htmlhelp.xsl"/>
+<xsl:include href="@VBOX_PATH_MANUAL_OUT_LANG@/titlepage-htmlhelp.xsl"/>
 
 <!-- Override the style sheet stuff from common-html-formatcfg.xsl, we don't
