Index: trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 65152)
+++ trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk	(revision 65153)
@@ -1257,5 +1257,5 @@
 	$(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui \
 	$(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui.dep \
-	$(PATH_TARGET)/docs.qtgui
+	$(QTGUI_DOXYFILE_OUTPUT)/docs.qtgui
 
 QTGUI_DOXYFILE_INPUT_DIRS := \
@@ -1301,7 +1301,7 @@
 	$(foreach dir, $(QTGUI_DOXYFILE_INPUT_DIRS), \
 		$(sort $(wildcard $(dir)/*.h)) \
-		$(wildcard $(dir)/*.cpp $(dir)/*.m $(dir)/*.mm))
-
--include $(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui.dep
+		$(sort $(wildcard $(dir)/*.cpp $(dir)/*.m $(dir)/*.mm)))
+
+includedep $(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui.dep
 
 # Generate the Doxyfile
@@ -1309,7 +1309,7 @@
 		$(PATH_SUB_CURRENT)/Doxyfile \
 		$(PATH_SUB_CURRENT)/Makefile.kmk \
-		$(comp-vars QTGUI_DOXYFILE_INPUT,QTGUI_DOXYFILE_INPUT_PREV,FORCE) \
+		$(comp-vars QTGUI_DOXYFILE_INPUT,DOXYGEN_QTGUI_INPUT_PREV,FORCE) \
+		$(comp-vars QTGUI_DOXYFILE_OUTPUT,DOXYGEN_QTGUI_OUTPUT_PREV,FORCE) \
 		| $$(dir $$@)
-	$(call MSG_L1,generating qtgui doxygen file)
 	$(QUIET)$(RM) -f $@ $@.tmp $@.dep
 	$(QUIET)$(CP) -f $< $@.tmp
@@ -1323,17 +1323,20 @@
 	$(QUIET)$(APPEND) $@.tmp
 	$(QUIET)$(MV) -f $@.tmp $@
-	@$(APPEND) $@.dep "QTGUI_DOXYFILE_INPUT_PREV = $(QTGUI_DOXYFILE_INPUT)"
+	@$(APPEND) $@.dep "DOXYGEN_QTGUI_OUTPUT_PREV = $(QTGUI_DOXYFILE_OUTPUT)"
+	@$(APPEND) $@.dep "DOXYGEN_QTGUI_INPUT_PREV = $(QTGUI_DOXYFILE_INPUT)"
 
 # Do the actual job.
-$(PATH_TARGET)/docs.qtgui: $(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui $$(QTGUI_DOXYFILE_INPUT) | $(QTGUI_DOXYFILE_OUTPUT)/
+$(QTGUI_DOXYFILE_OUTPUT)/docs.qtgui: $(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui $$(QTGUI_DOXYFILE_INPUT) \
+		| $(QTGUI_DOXYFILE_OUTPUT)/
 	$(call MSG_L1,doxygen qtgui)
+	$(QUIET)$(RM) -f $@
 	$(QUIET)$(RM) -Rf -- $(QTGUI_DOXYFILE_OUTPUT)/html/
-	$(QUIET)doxygen $(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui
-	$(QUIET)$(APPEND) $(PATH_TARGET)/docs.qtgui
+	doxygen $(QTGUI_DOXYFILE_OUTPUT)/Doxyfile.qtgui
+	$(APPEND) $@
 
 # aliases
-docs.qtgui: $(PATH_TARGET)/docs.qtgui
+docs.qtgui: $(QTGUI_DOXYFILE_OUTPUT)/docs.qtgui
 if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
-docs:      $(PATH_TARGET)/docs.qtgui
+docs: $(QTGUI_DOXYFILE_OUTPUT)/docs.qtgui
 endif
 
Index: trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- trunk/src/VBox/Runtime/Makefile.kmk	(revision 65152)
+++ trunk/src/VBox/Runtime/Makefile.kmk	(revision 65153)
@@ -129,7 +129,7 @@
 	$(IPRT_OUT_DIR)/odi2name.h \
 	$(IPRT_OUT_DIR)/odi2name.h.ts \
-	$(IPRT_OUT_DIR)/Doxyfile.iprt \
-	$(IPRT_OUT_DIR)/Doxyfile.iprt.dep \
-	$(IPRT_OUT_DIR)/docs.iprt
+	$(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt \
+	$(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt.dep \
+	$(IPRT_DOXYFILE_OUTPUT)/docs.iprt
 
 
@@ -2911,5 +2911,5 @@
 IPRT_DOXYFILE_INPUT := \
 	$(IPRT_DOXYFILE_INPUT_FIRST) \
-	$(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT))
+	$(sort $(filter-out $(IPRT_DOXYFILE_INPUT_FIRST), $(IPRT_DOXYFILE_INPUT)))
 
 
@@ -2917,12 +2917,12 @@
 BLDDIRS += $(IPRT_DOXYFILE_OUTPUT)
 
-includedep $(IPRT_OUT_DIR)/Doxyfile.iprt.dep
+includedep $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt.dep
 
 # Generate the Doxyfile
-$(IPRT_OUT_DIR)/Doxyfile.iprt: \
+$(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt: \
 		$(VBOX_PATH_RUNTIME_SRC)/Doxyfile \
 		$(VBOX_PATH_RUNTIME_SRC)/Makefile.kmk \
-		$(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_INPUT_PREV,FORCE) \
-		$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE) \
+		$(comp-vars IPRT_DOXYFILE_INPUT,DOXYGEN_IPRT_INPUT_PREV,FORCE) \
+		$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_IPRT_OUTPUT_PREV,FORCE) \
 		| $$(dir $$@)
 	$(QUIET)$(RM) -f $@ $@.tmp $@.dep
@@ -2947,29 +2947,32 @@
 	$(QUIET)$(APPEND) $@.tmp
 	$(QUIET)$(MV) -f $@.tmp $@
-	$(QUIET)$(APPEND) $@.dep "DOXYGEN_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
-	$(QUIET)$(APPEND) $@.dep "DOXYGEN_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
+	$(QUIET)$(APPEND) $@.dep "DOXYGEN_IPRT_OUTPUT_PREV = $(IPRT_DOXYFILE_OUTPUT)"
+	$(QUIET)$(APPEND) $@.dep "DOXYGEN_IPRT_INPUT_PREV = $(IPRT_DOXYFILE_INPUT)"
 
 # Do the actual job.
-$(IPRT_OUT_DIR)/docs.iprt: $(IPRT_OUT_DIR)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) | $(IPRT_DOXYFILE_OUTPUT)/
-	$(QUIET)$(RM) -f $(wildcard $(IPRT_DOXYFILE_OUTPUT)/html/*) $(IPRT_OUT_DIR)/docs.iprt
-	doxygen $(DOXYGEN_OPTS) $(IPRT_OUT_DIR)/Doxyfile.iprt
-	$(SED)	-e '/warning. Unexpected tag .dd. found/d' \
-		-e '/warning. Unsupported xml.html tag .globalScope. found/d' \
-               --output $(IPRT_DOXYFILE_OUTPUT)/errors2 \
-		$(IPRT_DOXYFILE_OUTPUT)/errors
+$(IPRT_DOXYFILE_OUTPUT)/docs.iprt: $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt $$(IPRT_DOXYFILE_INPUT) \
+		| $(IPRT_DOXYFILE_OUTPUT)/
+	$(QUIET)$(RM) -f $@
+	$(QUIET)$(RM) -Rf $(IPRT_DOXYFILE_OUTPUT)/html/
+	doxygen $(DOXYGEN_OPTS) $(IPRT_DOXYFILE_OUTPUT)/Doxyfile.iprt
+	$(SED) \
+                -e '/warning. Unexpected tag .dd. found/d' \
+                -e '/warning. Unsupported xml.html tag .globalScope. found/d' \
+                --output $(IPRT_DOXYFILE_OUTPUT)/errors2 \
+                $(IPRT_DOXYFILE_OUTPUT)/errors
 	$(CAT) $(IPRT_DOXYFILE_OUTPUT)/errors2
 	$(SED) -e "/[^ ]/q 1" $(IPRT_DOXYFILE_OUTPUT)/errors2
-	$(APPEND) $(IPRT_OUT_DIR)/docs.iprt
+	$(APPEND) $@
 
 # aliases
-docs.iprt: $(IPRT_OUT_DIR)/docs.iprt
+docs.iprt: $(IPRT_DOXYFILE_OUTPUT)/docs.iprt
 if !defined(VBOX_ONLY_DOCS) && defined(VBOX_WITH_ALL_DOXYGEN_TARGETS)
-docs:      $(IPRT_OUT_DIR)/docs.iprt
+docs: $(IPRT_DOXYFILE_OUTPUT)/docs.iprt
 endif
 
 test-doxygen::
-	@echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_OUTPUT_PREV,FORCE)
+	@echo test-$(comp-vars IPRT_DOXYFILE_OUTPUT,DOXYGEN_IPRT_OUTPUT_PREV,FORCE)
 	@echo $(IPRT_DOXYFILE_OUTPUT)
-	@echo $(DOXYGEN_OUTPUT_PREV)
+	@echo $(DOXYGEN_IPRT_OUTPUT_PREV)
 	@echo $(IPRT_DOXYFILE_INPUT)
 
