modified tools/rbuild/backend/mingw/modulehandler.cpp

Make .d files used for full dependencies depend on the module's .rbuild file

modified   tools/rbuild/backend/mingw/rule.cpp
   New $(buildfile) variable that expands to the module's .rbuild file name

svn path=/trunk/; revision=39097
This commit is contained in:
KJK::Hyperion 2009-01-25 16:53:56 +00:00
parent f165b7d65f
commit dcbca32fbc
2 changed files with 8 additions and 7 deletions

View file

@ -1060,7 +1060,7 @@ Rule arHostRule2 ( "\t$(ECHO_HOSTAR)\n"
NULL );
Rule gasRule ( "$(source): ${$(module_name)_precondition}\n"
"ifeq ($(ROS_BUILDDEPS),full)\n"
"$(intermediate_path_unique).o.d: $(source) | $(intermediate_dir)\n"
"$(intermediate_path_unique).o.d: $(source) $(buildfile) | $(intermediate_dir)\n"
"\t$(ECHO_DEPENDS)\n"
"\t${gcc} -x assembler-with-cpp -MF $@ -D__ASM__ $($(module_name)_CFLAGS) -M -MP -MT $@ $<\n"
"-include $(intermediate_path_unique).o.d\n"
@ -1084,7 +1084,7 @@ Rule nasmRule ( "$(source): ${$(module_name)_precondition}\n"
"$(intermediate_dir)$(SEP)", NULL );
Rule windresRule ( "$(source): ${$(module_name)_precondition}\n"
"ifeq ($(ROS_BUILDDEPS),full)\n"
"$(intermediate_path_unique).coff.d: $(source) | $(intermediate_dir) $(TEMPORARY)\n"
"$(intermediate_path_unique).coff.d: $(source) $(buildfile) | $(intermediate_dir) $(TEMPORARY)\n"
"\t$(ECHO_DEPENDS)\n"
"\t${gcc} -xc -M -MP -MT $@ -DRC_INVOKED ${$(module_name)_RCFLAGS} $(source) -MF $@\n"
"-include $(intermediate_path_unique).coff.d\n"
@ -1106,7 +1106,7 @@ Rule wmcRule ( "$(intermediate_path_noext).rc $(INTERMEDIATE)$(SEP)include$(SEP)
"$(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h",
"$(intermediate_dir)$(SEP)", NULL );
Rule winebuildPDefRule ( "ifeq ($(ROS_BUILDDEPS),full)\n"
"$(intermediate_path_unique).spec.d: $(source) | $(intermediate_dir)\n"
"$(intermediate_path_unique).spec.d: $(source) $(buildfile) | $(intermediate_dir)\n"
"\t$(ECHO_DEPENDS)\n"
"\t${gcc} -xc -M -MP -MT $@ ${$(module_name)_RCFLAGS} $(source) -MF $@\n\n"
"-include $(intermediate_path_unique).spec.d\n"
@ -1224,7 +1224,7 @@ Rule widlDlldataRule ( "$(source): $(dependencies) ${$(module_name)_preconditio
"\t$(ECHO_WIDL)\n"
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) --dlldata-only --dlldata=$(source) $(bare_dependencies)\n"
"ifeq ($(ROS_BUILDDEPS),full)\n"
"$(intermediate_path_noext).o.d: $(source) | $(intermediate_dir)\n"
"$(intermediate_path_noext).o.d: $(source) $(buildfile) | $(intermediate_dir)\n"
"\t$(ECHO_DEPENDS)\n"
"\t${gcc} -MF $@ $($(module_name)_CFLAGS)$(compiler_flags) -M -MP -MT $@ $<\n"
"-include $(intermediate_path_noext).o.d\n"
@ -1241,7 +1241,7 @@ Rule widlTlbRule ( "$(source): ${$(module_name)_precondition}\n"
"$(intermediate_dir)$(SEP)", NULL );
Rule gccRule ( "$(source): ${$(module_name)_precondition}\n"
"ifeq ($(ROS_BUILDDEPS),full)\n"
"$(intermediate_path_unique).o.d: $(source) | $(intermediate_dir)\n"
"$(intermediate_path_unique).o.d: $(source) $(buildfile) | $(intermediate_dir)\n"
"\t$(ECHO_DEPENDS)\n"
"\t${gcc} -MF $@ $($(module_name)_CFLAGS)$(compiler_flags) -M -MP -MT $@ $<\n"
"-include $(intermediate_path_unique).o.d\n"
@ -1258,7 +1258,7 @@ Rule gccHostRule ( "$(source): ${$(module_name)_precondition}\n"
"$(intermediate_path_unique).o", NULL );
Rule gppRule ( "$(source): ${$(module_name)_precondition}\n"
"ifeq ($(ROS_BUILDDEPS),full)\n"
"$(intermediate_path_unique).o.d: $(source) | $(intermediate_dir)\n"
"$(intermediate_path_unique).o.d: $(source) $(buildfile) | $(intermediate_dir)\n"
"\t$(ECHO_DEPENDS)\n"
"\t${gpp} -MF $@ $($(module_name)_CXXFLAGS)$(compiler_flags) -M -MP -MT $@ $<\n"
"-include $(intermediate_path_unique).o.d\n"
@ -1275,7 +1275,7 @@ Rule gppHostRule ( "$(source): ${$(module_name)_precondition}\n"
"$(intermediate_path_unique).o", NULL );
Rule pchRule ( "$(source): ${$(module_name)_precondition}\n"
"ifeq ($(ROS_BUILDDEPS),full)\n"
"$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d: $(source) | $(intermediate_dir)\n"
"$(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d: $(source) $(buildfile) | $(intermediate_dir)\n"
"\t$(ECHO_DEPENDS)\n"
"\t$(pch_cc) -MF $@ $(pch_ccflags)$(compiler_flags) -x $(pch_language) -M -MP -MT $@ $<\n"
"-include $(intermediate_dir)$(SEP).gch_$(module_name)$(SEP)$(source_name).gch.d\n"

View file

@ -63,6 +63,7 @@ FixString ( const string& str, Backend *backend, const Module& module, const Fil
ReplaceVariable ( ret, "$(intermediate_path_noext)", ReplaceExtension ( backend->GetFullName ( FileLocation ( IntermediateDirectory, source->relative_path, source->name ) ), "" ) );
ReplaceVariable ( ret, "$(intermediate_path_unique)", ReplaceExtension ( backend->GetFullName ( FileLocation ( IntermediateDirectory, source->relative_path, source->name ) ), "" ) + "_" + module.name );
}
ReplaceVariable ( ret, "$(buildfile)", module.xmlbuildFile );
ReplaceVariable ( ret, "$(dependencies)", dep );
ReplaceVariable ( ret, "$(bare_dependencies)", additional_dependencies );
ReplaceVariable ( ret, "$(module_name)", module.name );