Rebuild source if a header is changed
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak

Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak
--- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak	2005-04-05 18:20:45 UTC (rev 14509)
+++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.mak	2005-04-05 18:49:53 UTC (rev 14510)
@@ -143,6 +143,29 @@
 	$(RBUILD_COMMON_OBJECTS) \
 	$(RBUILD_SPECIAL_OBJECTS)
 
+RBUILD_BACKEND_DEVCPP_HEADERS = \
+	devcpp.h
+
+RBUILD_BACKEND_MINGW_HEADERS = \
+	mingw.h \
+	modulehandler.h
+
+RBUILD_BACKEND_HEADERS = \
+	backend.h \
+	$(addprefix devcpp$(SEP), $(RBUILD_BACKEND_DEVCPP_HEADERS)) \
+	$(addprefix mingw$(SEP), $(RBUILD_BACKEND_MINGW_HEADERS))
+
+RBUILD_HEADERS = \
+	$(addprefix $(RBUILD_BASE_), \
+		exception.h \
+		pch.h \
+		rbuild.h \
+		ssprintf.h \
+		test.h \
+		XML.h \
+		$(addprefix backend$(SEP), $(RBUILD_BACKEND_HEADERS)) \
+	)
+
 RBUILD_TESTS = \
 	tests$(SEP)cdfiletest.cpp \
 	tests$(SEP)definetest.cpp \
@@ -182,131 +205,131 @@
 	$(ECHO_LD)
 	${host_gpp} $(RBUILD_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $@
 
-$(RBUILD_INT_)automaticdependency.o: $(RBUILD_BASE_)automaticdependency.cpp $(RBUILD_INT)
+$(RBUILD_INT_)automaticdependency.o: $(RBUILD_BASE_)automaticdependency.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)bootstrap.o: $(RBUILD_BASE_)bootstrap.cpp $(RBUILD_INT)
+$(RBUILD_INT_)bootstrap.o: $(RBUILD_BASE_)bootstrap.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)cdfile.o: $(RBUILD_BASE_)cdfile.cpp $(RBUILD_INT)
+$(RBUILD_INT_)cdfile.o: $(RBUILD_BASE_)cdfile.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)compilerflag.o: $(RBUILD_BASE_)compilerflag.cpp $(RBUILD_INT)
+$(RBUILD_INT_)compilerflag.o: $(RBUILD_BASE_)compilerflag.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)define.o: $(RBUILD_BASE_)define.cpp $(RBUILD_INT)
+$(RBUILD_INT_)define.o: $(RBUILD_BASE_)define.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)exception.o: $(RBUILD_BASE_)exception.cpp $(RBUILD_INT)
+$(RBUILD_INT_)exception.o: $(RBUILD_BASE_)exception.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)include.o: $(RBUILD_BASE_)include.cpp $(RBUILD_INT)
+$(RBUILD_INT_)include.o: $(RBUILD_BASE_)include.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)installfile.o: $(RBUILD_BASE_)installfile.cpp $(RBUILD_INT)
+$(RBUILD_INT_)installfile.o: $(RBUILD_BASE_)installfile.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)linkerflag.o: $(RBUILD_BASE_)linkerflag.cpp $(RBUILD_INT)
+$(RBUILD_INT_)linkerflag.o: $(RBUILD_BASE_)linkerflag.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)module.o: $(RBUILD_BASE_)module.cpp $(RBUILD_INT)
+$(RBUILD_INT_)module.o: $(RBUILD_BASE_)module.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)project.o: $(RBUILD_BASE_)project.cpp $(RBUILD_INT)
+$(RBUILD_INT_)project.o: $(RBUILD_BASE_)project.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)rbuild.o: $(RBUILD_BASE_)rbuild.cpp $(RBUILD_INT)
+$(RBUILD_INT_)rbuild.o: $(RBUILD_BASE_)rbuild.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)ssprintf.o: $(RBUILD_BASE_)ssprintf.cpp $(RBUILD_INT)
+$(RBUILD_INT_)ssprintf.o: $(RBUILD_BASE_)ssprintf.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)stubbedcomponent.o: $(RBUILD_BASE_)stubbedcomponent.cpp $(RBUILD_INT)
+$(RBUILD_INT_)stubbedcomponent.o: $(RBUILD_BASE_)stubbedcomponent.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_INT_)XML.o: $(RBUILD_BASE_)XML.cpp $(RBUILD_INT)
+$(RBUILD_INT_)XML.o: $(RBUILD_BASE_)XML.cpp $(RBUILD_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_BACKEND_INT_)backend.o: $(RBUILD_BACKEND_BASE_)backend.cpp $(RBUILD_BACKEND_INT)
+$(RBUILD_BACKEND_INT_)backend.o: $(RBUILD_BACKEND_BASE_)backend.cpp $(RBUILD_BACKEND_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_MINGW_INT_)mingw.o: $(RBUILD_MINGW_BASE_)mingw.cpp $(RBUILD_MINGW_INT)
+$(RBUILD_MINGW_INT_)mingw.o: $(RBUILD_MINGW_BASE_)mingw.cpp $(RBUILD_MINGW_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_MINGW_INT_)modulehandler.o: $(RBUILD_MINGW_BASE_)modulehandler.cpp $(RBUILD_MINGW_INT)
+$(RBUILD_MINGW_INT_)modulehandler.o: $(RBUILD_MINGW_BASE_)modulehandler.cpp $(RBUILD_MINGW_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_DEVCPP_INT_)devcpp.o: $(RBUILD_DEVCPP_BASE_)devcpp.cpp $(RBUILD_DEVCPP_INT)
+$(RBUILD_DEVCPP_INT_)devcpp.o: $(RBUILD_DEVCPP_BASE_)devcpp.cpp $(RBUILD_DEVCPP_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TEST_TARGET): $(RBUILD_TEST_OBJECTS) $(RBUILD_OUT)
+$(RBUILD_TEST_TARGET): $(RBUILD_TEST_OBJECTS) $(RBUILD_OUT) $(RBUILD_HEADERS)
 	$(ECHO_LD)
 	${host_gpp} $(RBUILD_TEST_OBJECTS) $(RBUILD_HOST_LFLAGS) -o $@
 
-$(RBUILD_TESTS_INT_)cdfiletest.o: $(RBUILD_TESTS_BASE_)cdfiletest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)cdfiletest.o: $(RBUILD_TESTS_BASE_)cdfiletest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)definetest.o: $(RBUILD_TESTS_BASE_)definetest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)definetest.o: $(RBUILD_TESTS_BASE_)definetest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)functiontest.o: $(RBUILD_TESTS_BASE_)functiontest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)functiontest.o: $(RBUILD_TESTS_BASE_)functiontest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)iftest.o: $(RBUILD_TESTS_BASE_)iftest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)iftest.o: $(RBUILD_TESTS_BASE_)iftest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)includetest.o: $(RBUILD_TESTS_BASE_)includetest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)includetest.o: $(RBUILD_TESTS_BASE_)includetest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)invoketest.o: $(RBUILD_TESTS_BASE_)invoketest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)invoketest.o: $(RBUILD_TESTS_BASE_)invoketest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)linkerflagtest.o: $(RBUILD_TESTS_BASE_)linkerflagtest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)linkerflagtest.o: $(RBUILD_TESTS_BASE_)linkerflagtest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)moduletest.o: $(RBUILD_TESTS_BASE_)moduletest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)moduletest.o: $(RBUILD_TESTS_BASE_)moduletest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)projecttest.o: $(RBUILD_TESTS_BASE_)projecttest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)projecttest.o: $(RBUILD_TESTS_BASE_)projecttest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)sourcefiletest.o: $(RBUILD_TESTS_BASE_)sourcefiletest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)sourcefiletest.o: $(RBUILD_TESTS_BASE_)sourcefiletest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)symboltest.o: $(RBUILD_TESTS_BASE_)symboltest.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)symboltest.o: $(RBUILD_TESTS_BASE_)symboltest.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@
 
-$(RBUILD_TESTS_INT_)alltests.o: $(RBUILD_TESTS_BASE_)alltests.cpp $(RBUILD_TESTS_INT)
+$(RBUILD_TESTS_INT_)alltests.o: $(RBUILD_TESTS_BASE_)alltests.cpp $(RBUILD_TESTS_INT) $(RBUILD_HEADERS)
 	$(ECHO_CC)
 	${host_gpp} $(RBUILD_HOST_CXXFLAGS) -c $< -o $@