Author: hpoussin
Date: Fri Mar 7 13:56:05 2008
New Revision: 32595
URL:
http://svn.reactos.org/svn/reactos?rev=3D32595&view=3Drev
Log:
Move precondition to rules
Modified:
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
trunk/reactos/tools/rbuild/rbuild.mak
Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/=
mingw/modulehandler.cpp?rev=3D32595&r1=3D32594&r2=3D32595&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Fri Mar 7 1=
3:56:05 2008
@@ -1250,21 +1250,21 @@
Rule arRule2 ( "\t$(ECHO_AR)\n"
"\t${ar} -rc $@ $($(module_name)_OBJS)\n",
NULL );
-Rule gasRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(sour=
ce_dir)\n"
+Rule gasRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t)_$(module_name).o: $(source) ${$(module_name)_precondition}$(dependencies=
) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_GAS)\n"
"\t${gcc} -x assembler-with-cpp -c $< -o $@ -D__ASM__ $($(m=
odule_name)_CFLAGS)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t)_$(module_name).o",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule bootRule ( "$(module_output): $(source)$(dependencies) | $(OUTPUT)$(S=
EP)$(source_dir)\n"
+Rule bootRule ( "$(module_output): $(source) ${$(module_name)_precondition=
}$(dependencies) | $(OUTPUT)$(SEP)$(source_dir)\n"
"\t$(ECHO_NASM)\n"
"\t$(Q)${nasm} -f win32 $< -o $@ $($(module_name)_NASMFLAG=
S)\n",
"$(OUTPUT)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule nasmRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noe=
xt)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(sou=
rce_dir)\n"
+Rule nasmRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noe=
xt)_$(module_name).o: $(source) ${$(module_name)_precondition}$(dependencie=
s) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_NASM)\n"
"\t$(Q)${nasm} -f win32 $< -o $@ $($(module_name)_NASMFLAG=
S)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noe=
xt)_$(module_name).o",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule windresRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_=
noext)_$(module_name).coff: $(source)$(dependencies) $(WRC_TARGET) | $(INTE=
RMEDIATE)$(SEP)$(source_dir) $(TEMPORARY)\n"
+Rule windresRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_=
noext)_$(module_name).coff: $(source) ${$(module_name)_precondition}$(depen=
dencies) $(WRC_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir) $(TEMPORARY)\n"
"\t$(ECHO_WRC)\n"
"\t${gcc} -xc -E -DRC_INVOKED ${$(module_name)_RCFLAGS}=
$(source) > $(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).rci.tmp\=
n"
"\t$(Q)$(WRC_TARGET) ${$(module_name)_RCFLAGS} $(TEMPOR=
ARY)$(SEP)$(module_name).$(source_name_noext).rci.tmp $(TEMPORARY)$(SEP)$(m=
odule_name).$(source_name_noext).res.tmp\n"
@@ -1273,11 +1273,11 @@
"\t-@${rm} $(TEMPORARY)$(SEP)$(module_name).$(source_na=
me_noext).res.tmp 2>$(NUL)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_=
noext)_$(module_name).coff",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule wmcRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t).rc $(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h=
: $(WMC_TARGET) $(source)\n"
+Rule wmcRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t).rc $(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h=
: $(WMC_TARGET) $(source) ${$(module_name)_precondition}\n"
"\t$(ECHO_WMC)\n"
"\t$(Q)$(WMC_TARGET) -i -H $(INTERMEDIATE)$(SEP)include$(SE=
P)reactos$(SEP)$(source_name_noext).h -o $(INTERMEDIATE)$(SEP)$(source_dir)=
$(SEP)$(source_name_noext).rc $(source)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t).rc", "$(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext=
).h", NULL );
-Rule winebuildRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_nam=
e_noext).spec.def: $(source)$(dependencies) $(WINEBUILD_TARGET) | $(INTERME=
DIATE)$(SEP)$(source_dir)\n"
+Rule winebuildRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_nam=
e_noext).spec.def: $(source) ${$(module_name)_precondition}$(dependencies) =
$(WINEBUILD_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WINEBLD)\n"
"\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(IN=
TERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext).spec.def --def -E=
$(source_path)$(SEP)$(source_name_noext).spec\n"
"$(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_na=
me_noext).stubs.c: $(source_path)$(SEP)$(source_name_noext).spec $(WINEBUIL=
D_TARGET)\n"
@@ -1290,12 +1290,12 @@
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_nam=
e_noext).stubs.c",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_nam=
e_noext).stubs.o",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule widlHeaderRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext).h: $(source)$(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP=
)$(source_dir)\n"
+Rule widlHeaderRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext).h: $(source) ${$(module_name)_precondition}$(dependencies) $(WIDL=
_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WIDL)\n"
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h=
-H $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).h $(source=
)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext).h",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule widlServerRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_=
s.h: $(source)$(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(sourc=
e_dir)\n"
+Rule widlServerRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_=
s.h: $(source) ${$(module_name)_precondition}$(dependencies) $(WIDL_TARGET)=
| $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WIDL)\n"
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h=
-H $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h -s -S =
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(source)\=
n"
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_s.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)=
_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h$(depe=
ndencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
@@ -1305,7 +1305,7 @@
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_s.c",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_s.o",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule widlClientRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_=
c.h: $(source)$(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(sourc=
e_dir)\n"
+Rule widlClientRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_=
c.h: $(source) ${$(module_name)_precondition}$(dependencies) $(WIDL_TARGET)=
| $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WIDL)\n"
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h=
-H $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h -c -C =
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(source)\=
n"
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_c.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)=
_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h$(depe=
ndencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
@@ -1315,7 +1315,7 @@
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_c.c",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_na=
me_noext)_c.o",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule widlProxyRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_nam=
e_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p=
.h: $(source)$(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source=
_dir)\n"
+Rule widlProxyRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_nam=
e_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p=
.h: $(source) ${$(module_name)_precondition}$(dependencies) $(WIDL_TARGET) =
| $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WIDL)\n"
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -h =
-H $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h -p -P $=
(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c $(source)\n"
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_nam=
e_noext)_p.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_=
p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h$(depen=
dencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
@@ -1325,23 +1325,23 @@
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_nam=
e_noext)_p.c",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_nam=
e_noext)_p.o",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule widlTlbRule ( "$(OUTPUT)$(SEP)$(source_dir)$(SEP)$(module_name).tlb: =
$(source)$(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir=
)\n"
+Rule widlTlbRule ( "$(OUTPUT)$(SEP)$(source_dir)$(SEP)$(module_name).tlb: =
$(source) ${$(module_name)_precondition}$(dependencies) $(WIDL_TARGET) | $(=
INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_WIDL)\n"
"\t$(Q)$(WIDL_TARGET) $($(module_name)_WIDLFLAGS) -t -T=
$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).tlb $(source)=
\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL );
-Rule gccRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(sour=
ce_dir)\n"
+Rule gccRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t)_$(module_name).o: $(source) ${$(module_name)_precondition}$(dependencies=
) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_CC)\n"
"\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_fl=
ags)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t)_$(module_name).o", NULL );
-Rule gccHostRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_=
noext)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(=
source_dir)\n"
+Rule gccHostRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_=
noext)_$(module_name).o: $(source) ${$(module_name)_precondition}$(dependen=
cies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_CC)\n"
"\t${host_gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(co=
mpiler_flags)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_=
noext)_$(module_name).o", NULL );
-Rule gppRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(sour=
ce_dir)\n"
+Rule gppRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t)_$(module_name).o: $(source) ${$(module_name)_precondition}$(dependencies=
) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_CC)\n"
"\t${gpp} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_fl=
ags)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noex=
t)_$(module_name).o", NULL );
-Rule gppHostRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_=
noext)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(=
source_dir)\n"
+Rule gppHostRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_=
noext)_$(module_name).o: $(source) ${$(module_name)_precondition}$(dependen=
cies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n"
"\t$(ECHO_CC)\n"
"\t${host_gpp} -c $< -o $@ $($(module_name)_CFLAGS)$(co=
mpiler_flags)\n",
"$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_=
noext)_$(module_name).o", NULL );
@@ -2276,18 +2276,14 @@
string_list& dependencies ) const
{
/* Avoid circular dependency */
- if ( module.type !=3D BuildTool
- && module.name !=3D "zlib"
- && module.name !=3D "hostzlib" )
-
- dependencies.push_back ( "$(INIT)" );
-
- if ( module.type !=3D BuildTool
- && module.name !=3D "psdk" )
-
- dependencies.push_back ( "$(PSDK_TARGET) $(psdk_HEADERS)" );
-
- /* Check if any dependent library relays on the generated headers */
+ if ( module.host =3D=3D HostTrue )
+ return;
+
+ dependencies.push_back ( "$(INIT)" );
+ if ( module.name !=3D "psdk" )
+ dependencies.push_back ( "$(PSDK_TARGET) $(psdk_HEADERS)" );
+
+ /* Check if any dependent library relies on the generated headers */
for ( size_t i =3D 0; i < module.project.modules.size (); i++ )
{
const Module& m =3D *module.project.modules[i];
@@ -2329,13 +2325,6 @@
fprintf ( fMakefile, "\n\n" );
}
=
- for ( size_t i =3D 0; i < sourceFilenames.size(); i++ )
- {
- fprintf ( fMakefile,
- "%s: ${%s}\n",
- backend->GetFullName ( sourceFilenames[i] ).c_str (),
- preconditionDependenciesName.c_str ());
- }
fprintf ( fMakefile, "\n" );
}
=
Modified: trunk/reactos/tools/rbuild/rbuild.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.m=
ak?rev=3D32595&r1=3D32594&r2=3D32595&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/reactos/tools/rbuild/rbuild.mak (original)
+++ trunk/reactos/tools/rbuild/rbuild.mak Fri Mar 7 13:56:05 2008
@@ -269,9 +269,6 @@
xmlnode.cpp \
)
=
-RBUILD_SPECIAL_OBJECTS =3D \
- $(addprefix $(INTERMEDIATE_), $(RBUILD_SPECIAL_SOURCES:.cpp=3D.o))
-
RBUILD_OBJECTS =3D \
$(addprefix $(INTERMEDIATE_), $(RBUILD_SOURCES:.cpp=3D.o))
=