ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2008
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
460 discussions
Start a n
N
ew thread
[hpoussin] 32538: Clean up generated makefile.auto
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Feb 29 19:02:54 2008 New Revision: 32538 URL:
http://svn.reactos.org/svn/reactos?rev=32538&view=rev
Log: Clean up generated makefile.auto Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp trunk/reactos/tools/rbuild/backend/mingw/rule.cpp Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Fri Feb 29 19:02:54 2008 @@ -611,7 +611,7 @@ } fprintf ( fMakefile, " 2>$(NUL)\n" ); - if( ProxyMakefile::GenerateProxyMakefile(module) ) + if( ProxyMakefile::GenerateProxyMakefile(module) ) { DirectoryLocation root; @@ -770,11 +770,7 @@ { CompilerFlag& compilerFlag = *compilerFlags[i]; if ( compilerFlag.compiler == type ) - { - if ( parameters.length () > 0 ) - parameters += " "; - parameters += compilerFlag.flag; - } + parameters += " " + compilerFlag.flag; } return parameters; } @@ -855,7 +851,7 @@ { fprintf ( fMakefile, - " %s", + "%s", compilerParameters.c_str () ); } } @@ -1250,21 +1246,21 @@ Rule arRule2 ( "\t$(ECHO_AR)\n" "\t${ar} -rc $@ $($(module_name)_OBJS)\n", NULL ); -Rule gasRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule gasRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_GAS)\n" "\t${gcc} -x assembler-with-cpp -c $< -o $@ -D__ASM__ $($(module_name)_CFLAGS)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule bootRule ( "$(module_output): $(source) $(dependencies) | $(OUTPUT)$(SEP)$(source_dir)\n" +Rule bootRule ( "$(module_output): $(source)$(dependencies) | $(OUTPUT)$(SEP)$(source_dir)\n" "\t$(ECHO_NASM)\n" "\t$(Q)${nasm} -f win32 $< -o $@ $($(module_name)_NASMFLAGS)\n", "$(OUTPUT)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule nasmRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule nasmRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_NASM)\n" "\t$(Q)${nasm} -f win32 $< -o $@ $($(module_name)_NASMFLAGS)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(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) | $(INTERMEDIATE)$(SEP)$(source_dir) $(TEMPORARY)\n" +Rule windresRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).coff: $(source)$(dependencies) $(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} $(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).rci.tmp $(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).res.tmp\n" @@ -1277,71 +1273,71 @@ "\t$(ECHO_WMC)\n" "\t$(Q)$(WMC_TARGET) -i -H $(INTERMEDIATE)$(SEP)include$(SEP)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_noext).rc", "$(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h", NULL ); -Rule winebuildRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def: $(source) $(dependencies) $(WINEBUILD_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule winebuildRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def: $(source)$(dependencies) $(WINEBUILD_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_WINEBLD)\n" "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(INTERMEDIATE)$(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_name_noext).stubs.c: $(source_path)$(SEP)$(source_name_noext).spec $(WINEBUILD_TARGET)\n" "\t$(ECHO_WINEBLD)\n" "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext).stubs.c --pedll $(source_path)$(SEP)$(source_name_noext).spec\n" - "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_CC)\n" "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule widlHeaderRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).h: $(source) $(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule widlHeaderRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).h: $(source)$(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", + "\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_name_noext).h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule widlServerRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h: $(source) $(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule widlServerRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h: $(source)$(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_name_noext)_s.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_CC)\n" "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule widlClientRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h: $(source) $(dependencies) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule widlClientRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h: $(source)$(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_name_noext)_c.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_CC)\n" "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule widlProxyRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_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_name_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h: $(source)$(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_name_noext)_p.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\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_name_noext)_p.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_CC)\n" "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_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)$(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", + "\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_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule gccRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_CC)\n" "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(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)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_CC)\n" "\t${host_gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o", NULL ); -Rule gppRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule gppRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_CC)\n" "\t${gpp} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(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)$(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_CC)\n" "\t${host_gpp} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o", NULL ); @@ -1359,15 +1355,9 @@ string flags; string extension = GetExtension ( *sourceFile ); if ( extension == ".cc" || extension == ".cpp" || extension == ".cxx" ) - { flags = GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, CompilerTypeCPP ); - } else - { flags = GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, CompilerTypeCC ); - } - if ( flags != "" ) - flags = " " + flags; if ( pchFilename ) { @@ -1378,7 +1368,8 @@ /* WIDL generated headers may be used */ vector<FileLocation> rpcDependencies; GetRpcHeaderDependencies ( rpcDependencies ); - dependencies += " " + v2s ( backend, rpcDependencies, 5 ); + if ( rpcDependencies.size () > 0 ) + dependencies += " " + v2s ( backend, rpcDependencies, 5 ); rule->Execute ( fMakefile, backend, module, generatedSourceFileName, clean_files, dependencies, flags ); @@ -1488,7 +1479,7 @@ break; } - if ( extension == ".c" || extension == ".cc" || extension == ".cpp" || extension == ".cxx" ) + if ( extension == ".c" || extension == ".cc" || extension == ".cpp" || extension == ".cxx" ) { GenerateGccCommand ( &sourceFile, customRule, @@ -1658,7 +1649,7 @@ string linkerScriptArgument; if ( module.linkerScript != NULL ) - linkerScriptArgument = ssprintf ( "-Wl,-T,%s", backend->GetFullName ( module.linkerScript->file ).c_str () ); + linkerScriptArgument = ssprintf ( " -Wl,-T,%s", backend->GetFullName ( module.linkerScript->file ).c_str () ); else linkerScriptArgument = ""; @@ -1674,7 +1665,7 @@ if ( !module.IsDLL () ) { fprintf ( fMakefile, - "\t%s %s %s -o %s %s %s %s\n", + "\t%s %s%s -o %s %s %s %s\n", linker.c_str (), linkerParameters.c_str (), linkerScriptArgument.c_str (), @@ -1691,15 +1682,15 @@ CLEAN_FILE ( temp_exp ); fprintf ( fMakefile, - "\t${dlltool} --dllname %s --def %s --output-exp %s %s %s\n", + "\t${dlltool} --dllname %s --def %s --output-exp %s%s%s\n", targetName.c_str (), backend->GetFullName ( *definitionFilename ).c_str (), backend->GetFullName ( temp_exp ).c_str (), - module.mangledSymbols ? "" : "--kill-at", - module.underscoreSymbols ? "--add-underscore" : "" ); + module.mangledSymbols ? "" : " --kill-at", + module.underscoreSymbols ? " --add-underscore" : "" ); fprintf ( fMakefile, - "\t%s %s %s %s -o %s %s %s %s\n", + "\t%s %s%s %s -o %s %s %s %s\n", linker.c_str (), linkerParameters.c_str (), linkerScriptArgument.c_str (), @@ -1710,7 +1701,7 @@ GetLinkerMacro ().c_str () ); fprintf ( fMakefile, - "\t$(Q)$(PEFIXUP_TARGET) %s -exports %s\n", + "\t$(Q)$(PEFIXUP_TARGET) %s -exports%s\n", target_macro.c_str (), pefixupParameters.c_str() ); @@ -1727,7 +1718,7 @@ //printf ( "%s will have all its functions exported\n", // module.target->name.c_str () ); fprintf ( fMakefile, - "\t%s %s %s -o %s %s %s %s\n", + "\t%s %s%s -o %s %s %s %s\n", linker.c_str (), linkerParameters.c_str (), linkerScriptArgument.c_str (), @@ -1822,7 +1813,8 @@ /* WIDL generated headers may be used */ vector<FileLocation> rpcDependencies; GetRpcHeaderDependencies ( rpcDependencies ); - dependencies += " " + v2s ( backend, rpcDependencies, 5 ); + if ( rpcDependencies.size () > 0 ) + dependencies += " " + v2s ( backend, rpcDependencies, 5 ); fprintf ( fMakefile, "%s: %s | %s\n", backend->GetFullName ( *pchFilename ).c_str(), @@ -1855,11 +1847,11 @@ const FileLocation *definitionFilename = GetDefinitionFilename (); fprintf ( fMakefile, - "\t${dlltool} --dllname %s --def %s --output-lib $@ %s %s\n", + "\t${dlltool} --dllname %s --def %s --output-lib $@%s%s\n", module.importLibrary->dllname.c_str (), backend->GetFullName ( *definitionFilename ).c_str (), - module.mangledSymbols ? "" : "--kill-at", - module.underscoreSymbols ? "--add-underscore" : "" ); + module.mangledSymbols ? "" : " --kill-at", + module.underscoreSymbols ? " --add-underscore" : "" ); delete definitionFilename; } @@ -2284,7 +2276,7 @@ string extension = GetExtension ( sourceFile ); if (extension == ".mc" || extension == ".MC" ) { - string dependency = ssprintf ( " $(%s_MCHEADERS)", m.name.c_str () ); + string dependency = ssprintf ( "$(%s_MCHEADERS)", m.name.c_str () ); dependencies.push_back ( dependency ); } } @@ -2383,12 +2375,12 @@ fprintf ( fMakefile, "\t$(ECHO_DLLTOOL)\n" ); fprintf ( fMakefile, - "\t${dlltool} --dllname %s --def %s --output-lib %s %s %s\n\n", + "\t${dlltool} --dllname %s --def %s --output-lib %s%s%s\n\n", module.output->name.c_str (), backend->GetFullName ( *defFilename ).c_str (), backend->GetFullName ( *library_target ).c_str (), - module.mangledSymbols ? "" : "--kill-at", - module.underscoreSymbols ? "--add-underscore" : "" ); + module.mangledSymbols ? "" : " --kill-at", + module.underscoreSymbols ? " --add-underscore" : "" ); delete defFilename; delete library_target; @@ -2575,7 +2567,7 @@ GenerateLinkerCommand ( dependencies, linkerParameters + " $(NTOSKRNL_SHARED)", - "-sections" ); + " -sections" ); } else { @@ -2677,7 +2669,7 @@ module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, - "-sections" ); + " -sections" ); } else { @@ -2726,7 +2718,7 @@ module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, linkerParameters, - "-sections" ); + " -sections" ); } else { @@ -3134,24 +3126,24 @@ fprintf ( fMakefile, "\t$(ECHO_LD)\n" ); - if (Environment::GetArch() == "arm") - { - fprintf ( fMakefile, - "\t${gcc} -Wl,--subsystem,native -Wl,--section-start,startup=0x8000 -o %s %s %s %s\n", - backend->GetFullName ( junk_tmp ).c_str (), - objectsMacro.c_str (), - linkDepsMacro.c_str (), - GetLinkerMacro ().c_str ()); - } - else - { - fprintf ( fMakefile, - "\t${gcc} -Wl,--subsystem,native -Wl,-Ttext,0x8000 -o %s %s %s %s\n", - backend->GetFullName ( junk_tmp ).c_str (), - objectsMacro.c_str (), - linkDepsMacro.c_str (), - GetLinkerMacro ().c_str ()); - } + if (Environment::GetArch() == "arm") + { + fprintf ( fMakefile, + "\t${gcc} -Wl,--subsystem,native -Wl,--section-start,startup=0x8000 -o %s %s %s %s\n", + backend->GetFullName ( junk_tmp ).c_str (), + objectsMacro.c_str (), + linkDepsMacro.c_str (), + GetLinkerMacro ().c_str ()); + } + else + { + fprintf ( fMakefile, + "\t${gcc} -Wl,--subsystem,native -Wl,-Ttext,0x8000 -o %s %s %s %s\n", + backend->GetFullName ( junk_tmp ).c_str (), + objectsMacro.c_str (), + linkDepsMacro.c_str (), + GetLinkerMacro ().c_str ()); + } fprintf ( fMakefile, "\t${objcopy} -O binary %s $@\n", backend->GetFullName ( junk_tmp ).c_str () ); @@ -3439,12 +3431,12 @@ FileLocation reactosInf ( bootcdReactos.directory, bootcdReactos.relative_path, "reactos.inf" ); - FileLocation vgafontsCab( bootcdReactos.directory, - bootcdReactos.relative_path, - "vgafonts.cab"); - FileLocation vgafontsDir( SourceDirectory, - "media" + sSep + "vgafonts", - "" ); + FileLocation vgafontsCab( bootcdReactos.directory, + bootcdReactos.relative_path, + "vgafonts.cab"); + FileLocation vgafontsDir( SourceDirectory, + "media" + sSep + "vgafonts", + "" ); vSourceFiles.push_back ( reactosDff ); @@ -3474,10 +3466,10 @@ cdFiles.c_str (), cdDirectories.c_str () ); fprintf ( fMakefile, "\t$(ECHO_CABMAN)\n" ); - fprintf ( fMakefile, - "\t$(Q)$(CABMAN_TARGET) -M raw -S %s %s\\*.bin\n", // Escape the asterisk for Make - backend->GetFullName ( vgafontsCab ).c_str (), - backend->GetFullName ( vgafontsDir ).c_str ()); + fprintf ( fMakefile, + "\t$(Q)$(CABMAN_TARGET) -M raw -S %s %s\\*.bin\n", // Escape the asterisk for Make + backend->GetFullName ( vgafontsCab ).c_str (), + backend->GetFullName ( vgafontsDir ).c_str ()); fprintf ( fMakefile, "\t$(Q)$(CABMAN_TARGET) -C %s -L %s -I -P $(OUTPUT)\n", backend->GetFullName ( reactosDff ).c_str (), Modified: trunk/reactos/tools/rbuild/backend/mingw/rule.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/rule.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/rule.cpp Fri Feb 29 19:02:54 2008 @@ -40,10 +40,8 @@ const std::string& additional_dependencies, const std::string& compiler_flags ) { string ret = str; - string dep = ""; + string dep = additional_dependencies; - if ( additional_dependencies.length () > 0 ) - dep += additional_dependencies; dep += " " + module.xmlbuildFile; if ( source )
16 years, 10 months
1
0
0
0
[hpoussin] 32537: Use Rule class to describe .c/.cpp file compilation
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Feb 29 18:03:37 2008 New Revision: 32537 URL:
http://svn.reactos.org/svn/reactos?rev=32537&view=rev
Log: Use Rule class to describe .c/.cpp file compilation Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h trunk/reactos/tools/rbuild/backend/mingw/rule.cpp trunk/reactos/tools/rbuild/backend/mingw/rule.h Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Fri Feb 29 18:03:37 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_noext)_$(module_name).o: $(source) $(module_rbuild) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule gasRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_GAS)\n" "\t${gcc} -x assembler-with-cpp -c $< -o $@ -D__ASM__ $($(module_name)_CFLAGS)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule bootRule ( "$(module_output): $(source) $(module_rbuild) | $(OUTPUT)$(SEP)$(source_dir)\n" +Rule bootRule ( "$(module_output): $(source) $(dependencies) | $(OUTPUT)$(SEP)$(source_dir)\n" "\t$(ECHO_NASM)\n" "\t$(Q)${nasm} -f win32 $< -o $@ $($(module_name)_NASMFLAGS)\n", "$(OUTPUT)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule nasmRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source) $(module_rbuild) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule nasmRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_NASM)\n" "\t$(Q)${nasm} -f win32 $< -o $@ $($(module_name)_NASMFLAGS)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule windresRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).coff: $(source) $(module_rbuild) $(WRC_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir) $(TEMPORARY)\n" +Rule windresRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).coff: $(source) $(dependencies) $(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} $(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).rci.tmp $(TEMPORARY)$(SEP)$(module_name).$(source_name_noext).res.tmp\n" @@ -1277,73 +1277,98 @@ "\t$(ECHO_WMC)\n" "\t$(Q)$(WMC_TARGET) -i -H $(INTERMEDIATE)$(SEP)include$(SEP)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_noext).rc", "$(INTERMEDIATE)$(SEP)include$(SEP)reactos$(SEP)$(source_name_noext).h", NULL ); -Rule winebuildRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def: $(source) $(module_rbuild) $(WINEBUILD_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule winebuildRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def: $(source) $(dependencies) $(WINEBUILD_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_WINEBLD)\n" "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(INTERMEDIATE)$(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_name_noext).stubs.c: $(source_path)$(SEP)$(source_name_noext).spec $(WINEBUILD_TARGET)\n" "\t$(ECHO_WINEBLD)\n" - "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext).stubs.c --pedll $(source_path)$(SEP)$(source_name_noext).spec\n", + "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext).stubs.c --pedll $(source_path)$(SEP)$(source_name_noext).spec\n" + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "\t$(ECHO_CC)\n" + "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule widlHeaderRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).h: $(source) $(module_rbuild) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule widlHeaderRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).h: $(source) $(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_name_noext).h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule widlServerRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h: $(source) $(module_rbuild) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule widlServerRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h: $(source) $(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", + "\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_name_noext)_s.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "\t$(ECHO_CC)\n" + "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule widlClientRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h: $(source) $(module_rbuild) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule widlClientRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h: $(source) $(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", + "\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_name_noext)_c.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "\t$(ECHO_CC)\n" + "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule widlProxyRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h: $(source) $(module_rbuild) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule widlProxyRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h: $(source) $(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", + "\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_name_noext)_p.o: $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "\t$(ECHO_CC)\n" + "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); -Rule widlTlbRule ( "$(OUTPUT)$(SEP)$(source_dir)$(SEP)$(module_name).tlb: $(source) $(module_rbuild) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" +Rule widlTlbRule ( "$(OUTPUT)$(SEP)$(source_dir)$(SEP)$(module_name).tlb: $(source) $(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_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "\t$(ECHO_CC)\n" + "\t${gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o", NULL ); +Rule gccHostRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "\t$(ECHO_CC)\n" + "\t${host_gcc} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o", NULL ); +Rule gppRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "\t$(ECHO_CC)\n" + "\t${gpp} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o", NULL ); +Rule gppHostRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o: $(source) $(dependencies) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" + "\t$(ECHO_CC)\n" + "\t${host_gpp} -c $< -o $@ $($(module_name)_CFLAGS)$(compiler_flags)\n", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_$(module_name).o", NULL ); void MingwModuleHandler::GenerateGccCommand ( const FileLocation* sourceFile, + const Rule *rule, const string& extraDependencies ) { const FileLocation *generatedSourceFileName = GetActualSourceFilename ( sourceFile ); const FileLocation *pchFilename = GetPrecompiledHeaderFilename (); - string dependencies = backend->GetFullName ( *generatedSourceFileName ); - delete generatedSourceFileName; - - string cc; - CompilerType type; + string dependencies = extraDependencies; + + string flags; string extension = GetExtension ( *sourceFile ); if ( extension == ".cc" || extension == ".cpp" || extension == ".cxx" ) { - cc = ( module.host == HostTrue ? "${host_gpp}" : "${gpp}" ); - type = CompilerTypeCPP; + flags = GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, CompilerTypeCPP ); } else { - cc = ( module.host == HostTrue ? "${host_gcc}" : "${gcc}" ); - type = CompilerTypeCC; - } - string flags = GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, type ); + flags = GenerateCompilerParametersFromVector ( module.non_if_data.compilerFlags, CompilerTypeCC ); + } if ( flags != "" ) - flags = cflagsMacro + " " + flags; - else - flags = cflagsMacro; - - dependencies += extraDependencies; + flags = " " + flags; + if ( pchFilename ) { dependencies += " " + backend->GetFullName ( *pchFilename ); @@ -1354,22 +1379,10 @@ vector<FileLocation> rpcDependencies; GetRpcHeaderDependencies ( rpcDependencies ); dependencies += " " + v2s ( backend, rpcDependencies, 5 ); - dependencies += " " + NormalizeFilename ( module.xmlbuildFile ); - - const FileLocation *objectFilename = GetObjectFilename ( - sourceFile, module ); - fprintf ( fMakefile, - "%s: %s | %s\n", - backend->GetFullName ( *objectFilename ).c_str (), - dependencies.c_str (), - backend->GetFullPath ( *objectFilename ).c_str () ); - delete objectFilename; - - fprintf ( fMakefile, "\t$(ECHO_CC)\n" ); - fprintf ( fMakefile, - "\t%s -c $< -o $@ %s\n", - cc.c_str (), - flags.c_str () ); + + rule->Execute ( fMakefile, backend, module, generatedSourceFileName, clean_files, dependencies, flags ); + + delete generatedSourceFileName; } string @@ -1451,6 +1464,14 @@ { HostDontCare, RpcProxy, ".idl", &widlProxyRule }, { HostDontCare, EmbeddedTypeLib, ".idl", &widlTlbRule }, { HostDontCare, TypeDontCare, ".idl", &widlHeaderRule }, + { HostTrue, TypeDontCare, ".c", &gccHostRule }, + { HostTrue, TypeDontCare, ".cc", &gppHostRule }, + { HostTrue, TypeDontCare, ".cpp", &gppHostRule }, + { HostTrue, TypeDontCare, ".cxx", &gppHostRule }, + { HostFalse, TypeDontCare, ".c", &gccRule }, + { HostFalse, TypeDontCare, ".cc", &gppRule }, + { HostFalse, TypeDontCare, ".cpp", &gppRule }, + { HostFalse, TypeDontCare, ".cxx", &gppRule }, }; size_t i; Rule *customRule = NULL; @@ -1467,23 +1488,15 @@ break; } - if ( customRule ) + if ( extension == ".c" || extension == ".cc" || extension == ".cpp" || extension == ".cxx" ) + { + GenerateGccCommand ( &sourceFile, + customRule, + GetCompilationUnitDependencies ( compilationUnit ) + GetExtraDependencies ( &sourceFile ) + extraDependencies ); + } + else if ( customRule ) customRule->Execute ( fMakefile, backend, module, &sourceFile, clean_files ); - - if ( extension == ".c" || extension == ".cc" || extension == ".cpp" || extension == ".cxx" || - extension == ".spec" || - ( extension == ".idl" && - ( module.type == RpcServer ) || ( module.type == RpcClient ) || ( module.type == RpcProxy ) ) ) - { - const FileLocation *objectFilename = GetObjectFilename ( - &sourceFile, module ); - CLEAN_FILE ( *objectFilename ); - delete objectFilename; - - GenerateGccCommand ( &sourceFile, - GetCompilationUnitDependencies ( compilationUnit ) + GetExtraDependencies ( &sourceFile ) + extraDependencies ); - } - else if ( !customRule ) + else { throw InvalidOperationException ( __FILE__, __LINE__, Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h Fri Feb 29 18:03:37 2008 @@ -22,6 +22,7 @@ #include "mingw.h" class MingwBackend; +class Rule; extern std::string GetTargetMacro ( const Module&, bool with_dollar = true ); @@ -148,6 +149,7 @@ std::string GenerateNasmParameters () const; const FileLocation* GetPrecompiledHeaderFilename () const; void GenerateGccCommand ( const FileLocation* sourceFile, + const Rule *rule, const std::string& extraDependencies ); void GenerateCommands ( const CompilationUnit& compilationUnit, const std::string& extraDependencies ); Modified: trunk/reactos/tools/rbuild/backend/mingw/rule.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/rule.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/rule.cpp Fri Feb 29 18:03:37 2008 @@ -36,9 +36,15 @@ } static std::string -FixString ( const string& str, Backend *backend, const Module& module, const FileLocation *source ) +FixString ( const string& str, Backend *backend, const Module& module, const FileLocation *source, + const std::string& additional_dependencies, const std::string& compiler_flags ) { string ret = str; + string dep = ""; + + if ( additional_dependencies.length () > 0 ) + dep += additional_dependencies; + dep += " " + module.xmlbuildFile; if ( source ) { @@ -49,10 +55,12 @@ ReplaceVariable ( ret, "$(source_name_noext)", ReplaceExtension ( source->name , "" ) ); ReplaceVariable ( ret, "$(source_path)", backend->GetFullPath ( *source ) ); } + ReplaceVariable ( ret, "$(dependencies)", dep ); ReplaceVariable ( ret, "$(module_name)", module.name ); - ReplaceVariable ( ret, "$(module_rbuild)", module.xmlbuildFile ); ReplaceVariable ( ret, "$(module_output)", GetTargetMacro ( module, true ) ); ReplaceVariable ( ret, "$(SEP)", sSep ); + + ReplaceVariable ( ret, "$(compiler_flags)", compiler_flags ); return ret; } @@ -78,15 +86,17 @@ MingwBackend *backend, const Module& module, const FileLocation *source, - string_list& clean_files ) + string_list& clean_files, + const std::string& additional_dependencies, + const std::string& compiler_flags ) const { - string cmd = FixString ( command, backend, module, source ); + string cmd = FixString ( command, backend, module, source, additional_dependencies, compiler_flags ); fprintf ( outputFile, "%s", cmd.c_str () ); for ( size_t i = 0; i < generatedFiles.size (); i++ ) { - string file = FixString ( generatedFiles[i], backend, module, source ); + string file = FixString ( generatedFiles[i], backend, module, source, "", "" ); if ( file[file.length () - 1] != cSep ) { clean_files.push_back ( file ); Modified: trunk/reactos/tools/rbuild/backend/mingw/rule.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/rule.h (original) +++ trunk/reactos/tools/rbuild/backend/mingw/rule.h Fri Feb 29 18:03:37 2008 @@ -29,7 +29,9 @@ MingwBackend *backend, const Module& module, const FileLocation *source, - string_list& clean_files ); + string_list& clean_files, + const std::string& additional_dependencies = "", + const std::string& compiler_flags = "" ) const; private: const std::string command; string_list generatedFiles;
16 years, 10 months
1
0
0
0
[janderwald] 32536: - simplify code by using FindLanguageIndex for various string, error, page functions - fixes a crash when no hdd is attached See issue #3109 for more details.
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Feb 29 17:27:32 2008 New Revision: 32536 URL:
http://svn.reactos.org/svn/reactos?rev=32536&view=rev
Log: - simplify code by using FindLanguageIndex for various string, error, page functions - fixes a crash when no hdd is attached See issue #3109 for more details. Modified: trunk/reactos/base/setup/usetup/mui.c Modified: trunk/reactos/base/setup/usetup/mui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/mui.c?re…
============================================================================== --- trunk/reactos/base/setup/usetup/mui.c (original) +++ trunk/reactos/base/setup/usetup/mui.c Fri Feb 29 17:27:32 2008 @@ -94,7 +94,8 @@ if (SelectedLanguageId == NULL) { - return -1; + /* default to english */ + return 0; } do @@ -107,7 +108,7 @@ lngIndex++; }while (LanguageList[lngIndex].MuiPages != NULL); - return -1; + return 0; } @@ -116,31 +117,19 @@ FindMUIEntriesOfPage(IN ULONG PageNumber) { ULONG muiIndex = 0; - ULONG lngIndex = 0; + ULONG lngIndex; const MUI_PAGE * Pages = NULL; - do - { - /* First we search the language list till we find current selected language messages */ - if (_wcsicmp(LanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0) - { - /* Get all available pages for this language */ - Pages = LanguageList[lngIndex].MuiPages; - - do - { - /* Get page messages */ - if (Pages[muiIndex].Number == PageNumber) - return Pages[muiIndex].MuiEntry; - - muiIndex++; - } - while (Pages[muiIndex].MuiEntry != NULL); - } - - lngIndex++; - } - while (LanguageList[lngIndex].MuiPages != NULL); + lngIndex = max(FindLanguageIndex(), 0); + Pages = LanguageList[lngIndex].MuiPages; + + do + { + if (Pages[muiIndex].Number == PageNumber) + return Pages[muiIndex].MuiEntry; + + muiIndex++; + }while (Pages[muiIndex].MuiEntry != NULL); return NULL; } @@ -149,73 +138,23 @@ const MUI_ERROR * FindMUIErrorEntries(VOID) { - ULONG lngIndex = 0; - - do - { - /* First we search the language list till we find current selected language messages */ - if (_wcsicmp(LanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0) - { - /* Get all available error messages for this language */ - return LanguageList[lngIndex].MuiErrors; - } - - lngIndex++; - } - while (LanguageList[lngIndex].MuiPages != NULL); - - return NULL; + ULONG lngIndex = max(FindLanguageIndex(), 0); + return LanguageList[lngIndex].MuiErrors; } static const MUI_STRING * FindMUIStringEntries(VOID) { - ULONG lngIndex = 0; - - if (SelectedLanguageId == NULL) - { - /* language has not yet been selected - * default to english - */ - ASSERT(!_wcsicmp(LanguageList[lngIndex].LanguageDescriptor, L"English")); - return LanguageList[lngIndex].MuiStrings; - } - - do - { - /* First we search the language list till we find current selected language messages */ - if (_wcsicmp(LanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0) - { - /* Get all available strings for this language */ - return LanguageList[lngIndex].MuiStrings; - } - - lngIndex++; - } - while (LanguageList[lngIndex].MuiPages != NULL); - - return NULL; + ULONG lngIndex = max(FindLanguageIndex(), 0); + return LanguageList[lngIndex].MuiStrings; } LPCWSTR MUIDefaultKeyboardLayout(VOID) { - ULONG lngIndex = 0; - do - { - /* First we search the language list till we find current selected language messages */ - if (_wcsicmp(LanguageList[lngIndex].LanguageID , SelectedLanguageId) == 0) - { - /* Return default keyboard layout */ - return LanguageList[lngIndex].LanguageKeyboardLayoutID; - } - - lngIndex++; - } - while (LanguageList[lngIndex].MuiPages != NULL); - - return NULL; + ULONG lngIndex = max(FindLanguageIndex(), 0); + return LanguageList[lngIndex].LanguageKeyboardLayoutID; } VOID
16 years, 10 months
1
0
0
0
[hpoussin] 32535: Don't test if the variable is not NULL if it is always allocated Fix another typo
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Feb 29 16:45:19 2008 New Revision: 32535 URL:
http://svn.reactos.org/svn/reactos?rev=32535&view=rev
Log: Don't test if the variable is not NULL if it is always allocated Fix another typo Modified: trunk/reactos/tools/rbuild/cdfile.cpp trunk/reactos/tools/rbuild/compilationunit.cpp trunk/reactos/tools/rbuild/installfile.cpp trunk/reactos/tools/rbuild/module.cpp Modified: trunk/reactos/tools/rbuild/cdfile.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/cdfile.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/cdfile.cpp (original) +++ trunk/reactos/tools/rbuild/cdfile.cpp Fri Feb 29 16:45:19 2008 @@ -36,10 +36,8 @@ CDFile::~CDFile () { - if ( source ) - delete source; - if ( target ) - delete target; + delete source; + delete target; } CDFile::CDFile ( const Project& project, Modified: trunk/reactos/tools/rbuild/compilationunit.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/compilationun…
============================================================================== --- trunk/reactos/tools/rbuild/compilationunit.cpp (original) +++ trunk/reactos/tools/rbuild/compilationunit.cpp Fri Feb 29 16:45:19 2008 @@ -59,8 +59,7 @@ for ( i = 0; i < files.size (); i++ ) delete files[i]; - if ( default_name ) - delete default_name; + delete default_name; } void Modified: trunk/reactos/tools/rbuild/installfile.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/installfile.c…
============================================================================== --- trunk/reactos/tools/rbuild/installfile.cpp (original) +++ trunk/reactos/tools/rbuild/installfile.cpp Fri Feb 29 16:45:19 2008 @@ -24,11 +24,8 @@ InstallFile::~InstallFile() { - if ( source ) - delete source; - - if ( target ) - delete source; + delete source; + delete target; } InstallFile::InstallFile ( const Project& project, Modified: trunk/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/module.cpp (original) +++ trunk/reactos/tools/rbuild/module.cpp Fri Feb 29 16:45:19 2008 @@ -488,14 +488,13 @@ delete pch; if ( install ) delete install; - if ( output ) - delete output; if ( metadata ) delete metadata; if ( bootstrap ) delete bootstrap; if ( importLibrary ) delete importLibrary; + delete output; } void @@ -1598,8 +1597,7 @@ ImportLibrary::~ImportLibrary () { - if ( source ) - delete source; + delete source; }
16 years, 10 months
1
0
0
0
[hpoussin] 32534: Please at least test your changes before committing
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Feb 29 16:36:07 2008 New Revision: 32534 URL:
http://svn.reactos.org/svn/reactos?rev=32534&view=rev
Log: Please at least test your changes before committing Modified: trunk/reactos/tools/rbuild/cdfile.cpp Modified: trunk/reactos/tools/rbuild/cdfile.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/cdfile.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/cdfile.cpp (original) +++ trunk/reactos/tools/rbuild/cdfile.cpp Fri Feb 29 16:36:07 2008 @@ -37,8 +37,8 @@ CDFile::~CDFile () { if ( source ) - delete target; - if ( source ) + delete source; + if ( target ) delete target; }
16 years, 10 months
1
0
0
0
[cwittich] 32533: fix some more memory leaks
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Feb 29 16:26:28 2008 New Revision: 32533 URL:
http://svn.reactos.org/svn/reactos?rev=32533&view=rev
Log: fix some more memory leaks Modified: trunk/reactos/tools/rbuild/cdfile.cpp trunk/reactos/tools/rbuild/compilationunit.cpp trunk/reactos/tools/rbuild/include.cpp trunk/reactos/tools/rbuild/installfile.cpp trunk/reactos/tools/rbuild/module.cpp trunk/reactos/tools/rbuild/rbuild.h Modified: trunk/reactos/tools/rbuild/cdfile.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/cdfile.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/cdfile.cpp (original) +++ trunk/reactos/tools/rbuild/cdfile.cpp Fri Feb 29 16:26:28 2008 @@ -34,6 +34,14 @@ return path; } +CDFile::~CDFile () +{ + if ( source ) + delete target; + if ( source ) + delete target; +} + CDFile::CDFile ( const Project& project, const XMLElement& cdfileNode, const string& path ) Modified: trunk/reactos/tools/rbuild/compilationunit.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/compilationun…
============================================================================== --- trunk/reactos/tools/rbuild/compilationunit.cpp (original) +++ trunk/reactos/tools/rbuild/compilationunit.cpp Fri Feb 29 16:26:28 2008 @@ -58,6 +58,9 @@ size_t i; for ( i = 0; i < files.size (); i++ ) delete files[i]; + + if ( default_name ) + delete default_name; } void Modified: trunk/reactos/tools/rbuild/include.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/include.cpp?r…
============================================================================== --- trunk/reactos/tools/rbuild/include.cpp (original) +++ trunk/reactos/tools/rbuild/include.cpp Fri Feb 29 16:26:28 2008 @@ -53,6 +53,8 @@ Include::~Include() { + if ( directory ) + delete directory; } void Modified: trunk/reactos/tools/rbuild/installfile.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/installfile.c…
============================================================================== --- trunk/reactos/tools/rbuild/installfile.cpp (original) +++ trunk/reactos/tools/rbuild/installfile.cpp Fri Feb 29 16:26:28 2008 @@ -21,6 +21,15 @@ #include "rbuild.h" using std::string; + +InstallFile::~InstallFile() +{ + if ( source ) + delete source; + + if ( target ) + delete source; +} InstallFile::InstallFile ( const Project& project, const XMLElement& installfileNode, Modified: trunk/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/module.cpp (original) +++ trunk/reactos/tools/rbuild/module.cpp Fri Feb 29 16:26:28 2008 @@ -490,6 +490,12 @@ delete install; if ( output ) delete output; + if ( metadata ) + delete metadata; + if ( bootstrap ) + delete bootstrap; + if ( importLibrary ) + delete importLibrary; } void @@ -1590,6 +1596,13 @@ } +ImportLibrary::~ImportLibrary () +{ + if ( source ) + delete source; +} + + ImportLibrary::ImportLibrary ( const Project& project, const XMLElement& node, const Module& module ) Modified: trunk/reactos/tools/rbuild/rbuild.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=…
============================================================================== --- trunk/reactos/tools/rbuild/rbuild.h (original) +++ trunk/reactos/tools/rbuild/rbuild.h Fri Feb 29 16:26:28 2008 @@ -569,6 +569,7 @@ ImportLibrary ( const Project& project, const XMLElement& node, const Module& module ); + ~ImportLibrary (); }; @@ -816,6 +817,7 @@ CDFile ( const Project& project, const XMLElement& bootstrapNode, const std::string& path ); + ~CDFile (); private: static std::string ReplaceVariable ( const std::string& name, const std::string& value, @@ -832,6 +834,7 @@ InstallFile ( const Project& project, const XMLElement& bootstrapNode, const std::string& path ); + ~InstallFile (); };
16 years, 10 months
1
0
0
0
[cwittich] 32532: fix some memory leaks
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Feb 29 15:53:26 2008 New Revision: 32532 URL:
http://svn.reactos.org/svn/reactos?rev=32532&view=rev
Log: fix some memory leaks Modified: trunk/reactos/tools/rbuild/module.cpp Modified: trunk/reactos/tools/rbuild/module.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
============================================================================== --- trunk/reactos/tools/rbuild/module.cpp (original) +++ trunk/reactos/tools/rbuild/module.cpp Fri Feb 29 15:53:26 2008 @@ -486,6 +486,10 @@ delete linkerScript; if ( pch ) delete pch; + if ( install ) + delete install; + if ( output ) + delete output; } void
16 years, 10 months
1
0
0
0
[hpoussin] 32531: Remove parameters from GenerateLinkerCommand() ; they can be detected there Factorize some code in GenerateCommands()
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Feb 29 15:45:34 2008 New Revision: 32531 URL:
http://svn.reactos.org/svn/reactos?rev=32531&view=rev
Log: Remove parameters from GenerateLinkerCommand() ; they can be detected there Factorize some code in GenerateCommands() Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Fri Feb 29 15:45:34 2008 @@ -334,7 +334,7 @@ string dependencies = backend->GetFullName ( *header ); delete header; - return dependencies; + return " " + dependencies; } else return ""; @@ -352,7 +352,7 @@ const File& file = *compilationUnit.GetFiles ()[i]; sourceFiles.push_back ( backend->GetFullName ( file.file ) ); } - return v2s ( sourceFiles, 10 ); + return string ( " " ) + v2s ( sourceFiles, 10 ); } /* caller needs to delete the returned object */ @@ -1285,7 +1285,6 @@ "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext).stubs.c --pedll $(source_path)$(SEP)$(source_name_noext).spec\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c", - "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); Rule widlHeaderRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).h: $(source) $(module_rbuild) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_WIDL)\n" @@ -1297,21 +1296,18 @@ "\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_name_noext)_s.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c", - "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); Rule widlClientRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h: $(source) $(module_rbuild) $(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_name_noext)_c.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c", - "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); Rule widlProxyRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h: $(source) $(module_rbuild) $(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_name_noext)_p.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c", - "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); Rule widlTlbRule ( "$(OUTPUT)$(SEP)$(source_dir)$(SEP)$(module_name).tlb: $(source) $(module_rbuild) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_WIDL)\n" @@ -1347,8 +1343,7 @@ else flags = cflagsMacro; - if ( extraDependencies != "" ) - dependencies += " " + extraDependencies; + dependencies += extraDependencies; if ( pchFilename ) { dependencies += " " + backend->GetFullName ( *pchFilename ); @@ -1475,7 +1470,10 @@ if ( customRule ) customRule->Execute ( fMakefile, backend, module, &sourceFile, clean_files ); - if ( extension == ".c" || extension == ".cc" || extension == ".cpp" || extension == ".cxx" ) + if ( extension == ".c" || extension == ".cc" || extension == ".cpp" || extension == ".cxx" || + extension == ".spec" || + ( extension == ".idl" && + ( module.type == RpcServer ) || ( module.type == RpcClient ) || ( module.type == RpcProxy ) ) ) { const FileLocation *objectFilename = GetObjectFilename ( &sourceFile, module ); @@ -1483,18 +1481,7 @@ delete objectFilename; GenerateGccCommand ( &sourceFile, - GetCompilationUnitDependencies ( compilationUnit ) + extraDependencies ); - } - else if ( extension == ".spec" ) - { - GenerateGccCommand ( &sourceFile, - extraDependencies ); - } - else if ( extension == ".idl" && - ( module.type == RpcServer ) || ( module.type == RpcClient ) || ( module.type == RpcProxy ) ) - { - GenerateGccCommand ( &sourceFile, - GetExtraDependencies ( &sourceFile ) ); + GetCompilationUnitDependencies ( compilationUnit ) + GetExtraDependencies ( &sourceFile ) + extraDependencies ); } else if ( !customRule ) { @@ -1644,14 +1631,14 @@ void MingwModuleHandler::GenerateLinkerCommand ( const string& dependencies, - const string& linker, const string& linkerParameters, - const string& objectsMacro, - const string& libsMacro, const string& pefixupParameters ) { const FileLocation *target_file = GetTargetFilename ( module, NULL ); const FileLocation *definitionFilename = GetDefinitionFilename (); + string linker = module.cplusplus ? "${gpp}" : "${gcc}"; + string objectsMacro = GetObjectsMacro ( module ); + string libsMacro = GetLibsMacro (); string target_macro ( GetTargetMacro ( module ) ); string target_folder ( backend->GetFullPath ( *target_file ) ); @@ -2559,9 +2546,7 @@ { string targetMacro ( GetTargetMacro ( module ) ); string workingDirectory = GetWorkingDirectory ( ); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2571,16 +2556,13 @@ string dependencies = linkDepsMacro + " " + objectsMacro; - string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s", - module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), - module.baseaddress.c_str () ); - + string linkerParameters = ssprintf ( "-Wl,--subsystem,native -Wl,--entry,%s -Wl,--image-base,%s", + module.GetEntryPoint(!(Environment::GetArch() == "arm")).c_str (), + module.baseaddress.c_str () ); + GenerateLinkerCommand ( dependencies, - "${gcc}", - linkerParameters + " $(NTOSKRNL_SHARED)", - objectsMacro, - libsMacro, - "-sections" ); + linkerParameters + " $(NTOSKRNL_SHARED)", + "-sections" ); } else { @@ -2667,9 +2649,7 @@ { string targetMacro ( GetTargetMacro ( module ) ); string workingDirectory = GetWorkingDirectory ( ); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2683,10 +2663,7 @@ module.GetEntryPoint(true).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, - "${gcc}", linkerParameters, - objectsMacro, - libsMacro, "-sections" ); } else @@ -2721,9 +2698,7 @@ { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory (); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2737,10 +2712,7 @@ module.GetEntryPoint(true).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, - "${gcc}", linkerParameters, - objectsMacro, - libsMacro, "-sections" ); } else @@ -2774,9 +2746,7 @@ { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2790,10 +2760,7 @@ module.GetEntryPoint(true).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, - "${gcc}", linkerParameters, - objectsMacro, - libsMacro, "" ); } else @@ -2827,9 +2794,7 @@ { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2843,10 +2808,7 @@ module.GetEntryPoint(true).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, - "${gcc}", linkerParameters, - objectsMacro, - libsMacro, "" ); } else @@ -2957,9 +2919,7 @@ { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -2968,21 +2928,12 @@ GenerateRules (); string dependencies = linkDepsMacro + " " + objectsMacro; - - string linker; - if ( module.cplusplus ) - linker = "${gpp}"; - else - linker = "${gcc}"; string linkerParameters = ssprintf ( "-Wl,--subsystem,console -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -shared", module.GetEntryPoint(true).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, - linker, linkerParameters, - objectsMacro, - libsMacro, "" ); } else @@ -3010,9 +2961,7 @@ { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -3021,21 +2970,12 @@ GenerateRules (); string dependencies = linkDepsMacro + " " + objectsMacro; - - string linker; - if ( module.cplusplus ) - linker = "${gpp}"; - else - linker = "${gcc}"; string linkerParameters = ssprintf ( "-Wl,--subsystem,console -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000 -shared", module.GetEntryPoint(true).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, - linker, linkerParameters, - objectsMacro, - libsMacro, "" ); } else @@ -3070,9 +3010,7 @@ { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -3081,21 +3019,12 @@ GenerateRules (); string dependencies = linkDepsMacro + " " + objectsMacro; - - string linker; - if ( module.cplusplus ) - linker = "${gpp}"; - else - linker = "${gcc}"; string linkerParameters = ssprintf ( "-Wl,--subsystem,console -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000", module.GetEntryPoint(true).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, - linker, linkerParameters, - objectsMacro, - libsMacro, "" ); } else @@ -3130,9 +3059,7 @@ { string targetMacro ( GetTargetMacro (module) ); string workingDirectory = GetWorkingDirectory ( ); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -3141,21 +3068,12 @@ GenerateRules (); string dependencies = linkDepsMacro + " " + objectsMacro; - - string linker; - if ( module.cplusplus ) - linker = "${gpp}"; - else - linker = "${gcc}"; string linkerParameters = ssprintf ( "-Wl,--subsystem,windows -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000", module.GetEntryPoint(true).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, - linker, linkerParameters, - objectsMacro, - libsMacro, "" ); } else @@ -3761,9 +3679,7 @@ { string targetMacro ( GetTargetMacro ( module ) ); string workingDirectory = GetWorkingDirectory ( ); - string objectsMacro = GetObjectsMacro ( module ); string linkDepsMacro = GetLinkingDependenciesMacro (); - string libsMacro = GetLibsMacro (); GenerateImportLibraryTargetIfNeeded (); @@ -3772,21 +3688,12 @@ GenerateRules (); string dependencies = linkDepsMacro + " " + objectsMacro; - - string linker; - if ( module.cplusplus ) - linker = "${gpp}"; - else - linker = "${gcc}"; string linkerParameters = ssprintf ( "-Wl,--subsystem,console -Wl,--entry,%s -Wl,--image-base,%s -Wl,--file-alignment,0x1000 -Wl,--section-alignment,0x1000", module.GetEntryPoint(true).c_str (), module.baseaddress.c_str () ); GenerateLinkerCommand ( dependencies, - linker, linkerParameters, - objectsMacro, - libsMacro, "" ); } else Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h Fri Feb 29 15:45:34 2008 @@ -111,10 +111,7 @@ void GenerateRunRsymCode () const; void GenerateRunStripCode () const; void GenerateLinkerCommand ( const std::string& dependencies, - const std::string& linker, const std::string& linkerParameters, - const std::string& objectsMacro, - const std::string& libsMacro, const std::string& pefixupParameters ); void GeneratePhonyTarget() const; void GenerateBuildMapCode ( const FileLocation *mapTarget = NULL );
16 years, 10 months
1
0
0
0
[cwittich] 32530: fix msvc build
by cwittich@svn.reactos.org
Author: cwittich Date: Fri Feb 29 15:24:56 2008 New Revision: 32530 URL:
http://svn.reactos.org/svn/reactos?rev=32530&view=rev
Log: fix msvc build Modified: trunk/reactos/tools/rbuild/rbuild.vcproj Modified: trunk/reactos/tools/rbuild/rbuild.vcproj URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.vcproj…
============================================================================== --- trunk/reactos/tools/rbuild/rbuild.vcproj (original) +++ trunk/reactos/tools/rbuild/rbuild.vcproj Fri Feb 29 15:24:56 2008 @@ -423,6 +423,14 @@ /> </FileConfiguration> </File> + <File + RelativePath=".\backend\mingw\rule.cpp" + > + </File> + <File + RelativePath=".\backend\mingw\rule.h" + > + </File> </Filter> <Filter Name="backend_sources"
16 years, 10 months
1
0
0
0
[hpoussin] 32529: GetObjectFilename() shouldn't be able to modify the list of generated files
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Feb 29 15:10:07 2008 New Revision: 32529 URL:
http://svn.reactos.org/svn/reactos?rev=32529&view=rev
Log: GetObjectFilename() shouldn't be able to modify the list of generated files Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp Fri Feb 29 15:10:07 2008 @@ -280,7 +280,7 @@ string extension = GetExtension ( *file ); if ( extension == ".spec" || extension == ".SPEC" ) { - const FileLocation *objectFile = GetObjectFilename ( file, module, NULL ); + const FileLocation *objectFile = GetObjectFilename ( file, module ); FileLocation *sourceFile = new FileLocation ( objectFile->directory, objectFile->relative_path, @@ -291,7 +291,7 @@ else if ( ( extension == ".idl" || extension == ".IDL" ) && ( module.type == RpcServer || module.type == RpcClient || module.type == RpcProxy ) ) { - const FileLocation *objectFile = GetObjectFilename ( file, module, NULL ); + const FileLocation *objectFile = GetObjectFilename ( file, module ); FileLocation *sourceFile = new FileLocation ( objectFile->directory, objectFile->relative_path, @@ -301,7 +301,7 @@ } else if ( extension == ".mc" || extension == ".MC" ) { - const FileLocation *objectFile = GetObjectFilename ( file, module, NULL ); + const FileLocation *objectFile = GetObjectFilename ( file, module ); FileLocation *sourceFile = new FileLocation ( objectFile->directory, objectFile->relative_path, @@ -417,7 +417,7 @@ { CompilationUnit& compilationUnit = *compilationUnits[i]; const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *objectFilename = GetObjectFilename ( &compilationName, importedModule, NULL ); + const FileLocation *objectFilename = GetObjectFilename ( &compilationName, importedModule ); if ( GetExtension ( *objectFilename ) == ".h" ) dep += ssprintf ( " $(%s_HEADERS)", importedModule.name.c_str () ); else if ( GetExtension ( *objectFilename ) == ".rc" ) @@ -529,8 +529,7 @@ const FileLocation* MingwModuleHandler::GetObjectFilename ( const FileLocation* sourceFile, - const Module& module, - string_list* pclean_files ) const + const Module& module ) const { DirectoryLocation destination_directory; string newExtension; @@ -567,12 +566,8 @@ destination_directory, sourceFile->relative_path, ReplaceExtension ( sourceFile->name, newExtension ) ); - - if ( pclean_files ) - { - string_list& clean_files = *pclean_files; - CLEAN_FILE ( *obj_file ); - } + PassThruCacheDirectory ( obj_file ); + return obj_file; } @@ -676,7 +671,7 @@ if ( objectFilenames.size () > 0 ) objectFilenames += " "; const FileLocation& compilationName = compilationUnits[i]->GetFilename (); - const FileLocation *object_file = GetObjectFilename ( &compilationName, module, NULL ); + const FileLocation *object_file = GetObjectFilename ( &compilationName, module ); objectFilenames += backend->GetFullName ( *object_file ); delete object_file; } @@ -1097,7 +1092,7 @@ if ( compilationUnit.IsFirstFile () ) { const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *object_file = GetObjectFilename ( &compilationName, module, NULL ); + const FileLocation *object_file = GetObjectFilename ( &compilationName, module ); fprintf ( fMakefile, "%s := %s $(%s)\n", objectsMacro.c_str(), @@ -1117,7 +1112,7 @@ if ( !compilationUnit.IsFirstFile () ) { const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *objectFilename = GetObjectFilename ( &compilationName, module, NULL ); + const FileLocation *objectFilename = GetObjectFilename ( &compilationName, module ); if ( GetExtension ( *objectFilename ) == ".h" ) headers.push_back ( objectFilename ); else if ( GetExtension ( *objectFilename ) == ".rc" ) @@ -1227,7 +1222,7 @@ for ( i = 0; i < sourceCompilationUnits.size (); i++ ) { const FileLocation& compilationName = sourceCompilationUnits[i]->GetFilename (); - const FileLocation *object_file = GetObjectFilename ( &compilationName, module, NULL ); + const FileLocation *object_file = GetObjectFilename ( &compilationName, module ); fprintf ( fMakefile, "%s += %s\n", @@ -1290,6 +1285,7 @@ "\t$(Q)$(WINEBUILD_TARGET) $(WINEBUILD_FLAGS) -o $(INTERMEDIATE)$(SEP)$(source_path)$(SEP)$(source_name_noext).stubs.c --pedll $(source_path)$(SEP)$(source_name_noext).spec\n", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).spec.def", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.c", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).stubs.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); Rule widlHeaderRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext).h: $(source) $(module_rbuild) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_WIDL)\n" @@ -1301,18 +1297,21 @@ "\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_name_noext)_s.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.c", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_s.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); Rule widlClientRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.h: $(source) $(module_rbuild) $(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_name_noext)_c.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.c", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_c.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); Rule widlProxyRule ( "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c $(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.h: $(source) $(module_rbuild) $(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_name_noext)_p.h", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.c", + "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)$(source_name_noext)_p.o", "$(INTERMEDIATE)$(SEP)$(source_dir)$(SEP)", NULL ); Rule widlTlbRule ( "$(OUTPUT)$(SEP)$(source_dir)$(SEP)$(module_name).tlb: $(source) $(module_rbuild) $(WIDL_TARGET) | $(INTERMEDIATE)$(SEP)$(source_dir)\n" "\t$(ECHO_WIDL)\n" @@ -1363,13 +1362,12 @@ dependencies += " " + NormalizeFilename ( module.xmlbuildFile ); const FileLocation *objectFilename = GetObjectFilename ( - sourceFile, module, NULL ); + sourceFile, module ); fprintf ( fMakefile, "%s: %s | %s\n", backend->GetFullName ( *objectFilename ).c_str (), dependencies.c_str (), backend->GetFullPath ( *objectFilename ).c_str () ); - CLEAN_FILE(*objectFilename); delete objectFilename; fprintf ( fMakefile, "\t$(ECHO_CC)\n" ); @@ -1479,6 +1477,11 @@ if ( extension == ".c" || extension == ".cc" || extension == ".cpp" || extension == ".cxx" ) { + const FileLocation *objectFilename = GetObjectFilename ( + &sourceFile, module ); + CLEAN_FILE ( *objectFilename ); + delete objectFilename; + GenerateGccCommand ( &sourceFile, GetCompilationUnitDependencies ( compilationUnit ) + extraDependencies ); } @@ -1589,7 +1592,7 @@ { CompilationUnit& compilationUnit = *data.compilationUnits[i]; const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *object_file = GetObjectFilename ( &compilationName, module, NULL ); + const FileLocation *object_file = GetObjectFilename ( &compilationName, module ); objectFiles.push_back ( *object_file ); delete object_file; } @@ -1771,7 +1774,7 @@ { CompilationUnit& compilationUnit = *compilationUnits[i]; const FileLocation& compilationName = compilationUnit.GetFilename (); - const FileLocation *objectFilename = GetObjectFilename ( &compilationName, module, NULL ); + const FileLocation *objectFilename = GetObjectFilename ( &compilationName, module ); if ( GetExtension ( *objectFilename ) == ".h" ) moduleDependencies += ssprintf ( " $(%s_HEADERS)", module.name.c_str () ); else if ( GetExtension ( *objectFilename ) == ".rc" ) Modified: trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
============================================================================== --- trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h (original) +++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.h Fri Feb 29 15:10:07 2008 @@ -97,8 +97,7 @@ bool includeGeneratedFiles ) const; void GetSourceFilenamesWithoutGeneratedFiles ( std::vector<FileLocation>& list ) const; const FileLocation* GetObjectFilename ( const FileLocation* sourceFile, - const Module& module, - string_list* pclean_files ) const; + const Module& module ) const; std::string GetObjectFilenames ();
16 years, 10 months
1
0
0
0
← Newer
1
2
3
4
...
46
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
Results per page:
10
25
50
100
200