Author: hyperion
Date: Tue Nov 17 03:54:29 2009
New Revision: 44208
URL:
http://svn.reactos.org/svn/reactos?rev=44208&view=rev
Log:
modified Makefile
$(ECHO_DLLTOOL) -> $(ECHO_IMPLIB)
New status line ECHO_RSP for built-in response file generator rule
$(NL) variable that expands to a newline -- only known way to escape the newline
character in GNU make
modified tools/rbuild/backend/mingw/linkers/ld.mak
$(ECHO DLLTOOL) -> $(ECHO_DLLTOOL) -> $(ECHO_IMPLIB)
Generate a response file with the list of object files, instead of passing every single
object file on the linker command line. Our really long linker command lines should no
longer be an issue
modified tools/rbuild/backend/mingw/modulehandler.cpp
Clean files generated by externally-defined rules
Build issues fix 1/2 (1/3?)
Modified:
trunk/reactos/Makefile
trunk/reactos/tools/rbuild/backend/mingw/linkers/ld.mak
trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp
Modified: trunk/reactos/Makefile
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/Makefile?rev=44208&r1=…
==============================================================================
--- trunk/reactos/Makefile [iso-8859-1] (original)
+++ trunk/reactos/Makefile [iso-8859-1] Tue Nov 17 03:54:29 2009
@@ -151,6 +151,11 @@
$(error ReactOS's makefiles use GNU Make 3.80+ features, you have $(MAKE_VERSION),
you MUST UPGRADE in order to build ReactOS - Sorry)
endif
# END of code borrowed from GMSL (
http://gmsl.sourceforge.net/ )
+
+define NL
+
+
+endef
.PHONY: all
.PHONY: clean
@@ -234,7 +239,7 @@
ECHO_CVTRES =@echo $(QUOTE)[CVTRES] $@$(QUOTE)
ECHO_WIDL =@echo $(QUOTE)[WIDL] $@$(QUOTE)
ECHO_BIN2RES =@echo $(QUOTE)[BIN2RES] $<$(QUOTE)
- ECHO_DLLTOOL =@echo $(QUOTE)[DLLTOOL] $@$(QUOTE)
+ ECHO_IMPLIB =@echo $(QUOTE)[IMPLIB] $@$(QUOTE)
ECHO_LD =@echo $(QUOTE)[LD] $@$(QUOTE)
ECHO_HOSTLD =@echo $(QUOTE)[HOST-LD] $@$(QUOTE)
ECHO_LINK =@echo $(QUOTE)[LINK] $@$(QUOTE)
@@ -254,6 +259,7 @@
ECHO_STRIP =@echo $(QUOTE)[STRIP] $@$(QUOTE)
ECHO_RGENSTAT=@echo $(QUOTE)[RGENSTAT] $@$(QUOTE)
ECHO_DEPENDS =@echo $(QUOTE)[DEPENDS] $<$(QUOTE)
+ ECHO_RSP =@echo $(QUOTE)[RSP] $@$(QUOTE)
else
ECHO_CP =
ECHO_MKDIR =
@@ -273,7 +279,7 @@
ECHO_CVTRES =
ECHO_WIDL =
ECHO_BIN2RES =
- ECHO_DLLTOOL =
+ ECHO_IMPLIB =
ECHO_LD =
ECHO_HOSTLD =
ECHO_NM =
@@ -291,6 +297,7 @@
ECHO_STRIP =
ECHO_RGENSTAT=
ECHO_DEPENDS =
+ ECHO_RSP =
endif
# Set host compiler/linker
Modified: trunk/reactos/tools/rbuild/backend/mingw/linkers/ld.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/linkers/ld.mak [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/linkers/ld.mak [iso-8859-1] Tue Nov 17
03:54:29 2009
@@ -10,15 +10,15 @@
ifneq ($(6),)
${call RBUILD_intermediate_dir,$(5)}$$(SEP)lib${call RBUILD_name,$(5)}.a: $(6) | ${call
RBUILD_intermediate_path,$(5)}
- $$(ECHO DLLTOOL)
+ $$(ECHO_IMPLIB)
$${dlltool} --def $(6) --kill-at --output-lib=$$@
${call RBUILD_intermediate_dir,$(5)}$$(SEP)lib${call RBUILD_name,$(5)}.delayimp.a: $(6) |
${call RBUILD_intermediate_path,$(5)}
- $$(ECHO DLLTOOL)
+ $$(ECHO_IMPLIB)
$${dlltool} --def $(6) --kill-at --output-delaylib=$$@
${call RBUILD_intermediate_path_noext,$(5)}.exp: $(6) | ${call
RBUILD_intermediate_path,$(5)}
- $$(ECHO DLLTOOL)
+ $$(ECHO_IMPLIB)
$${dlltool} --def $(6) --kill-at --output-exp=$$@
$(1)_CLEANFILES+=\
@@ -27,9 +27,18 @@
${call RBUILD_intermediate_path_noext,$(5)}.exp
endif
-$(5): $(2) $$(if $(6),${call RBUILD_intermediate_path_noext,$(5)}.exp) $(7) $(3)
$$(RSYM_TARGET) $$(PEFIXUP_TARGET) | ${call RBUILD_dir,$(5)}
+# TODO: refactor this out of here and into rules.mak
+${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp: $(2) $$(if $(6),${call
RBUILD_intermediate_path_noext,$(5)}.exp) $(3) | ${call RBUILD_intermediate_dir,$(5)}
+ $$(ECHO_RSP)
+ -@$${rm} $$@ 2>$$(NUL)
+ $${cp} $$(NUL) $$@ >$$(NUL)
+ $$(foreach obj,$(2) $$(if $(6),${call
RBUILD_intermediate_path_noext,$(5)}.exp),$$(Q)echo $$(QUOTE)$$(subst
\,\\,$$(obj))$$(QUOTE)>>$$@$$(NL))
+
+$(1)_CLEANFILES+=${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp
+
+$(5): ${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(7) $(3) $$(RSYM_TARGET)
$$(PEFIXUP_TARGET) | ${call RBUILD_dir,$(5)}
$$(ECHO_LD)
- $${ld} --entry=$(8) --image-base=$(9) $(2) $$(if $(6),${call
RBUILD_intermediate_path_noext,$(5)}.exp) $(7) ${call RBUILD_ldflags,$(1),$(4)} -o $$@
+ $${ld} --entry=$(8) --image-base=$(9) @${call
RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(7) ${call RBUILD_ldflags,$(1),$(4)} -o
$$@
ifneq ($(or $(6),$$(MODULETYPE$$($(1)_TYPE)_KMODE)),)
$$(ECHO_PEFIXUP)
$$(Q)$$(PEFIXUP_TARGET) $$@ $(if $(6),-exports) $$(if
$$(MODULETYPE$($(1)_TYPE)_KMODE),-sections)
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 [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/modulehandler.cpp [iso-8859-1] Tue Nov 17
03:54:29 2009
@@ -516,6 +516,9 @@
}
fprintf ( fMakefile, " 2>$(NUL)\n" );
+ // Clean files generated by external rules
+ fprintf ( fMakefile, "\t-@${rm} $(%s_CLEANFILES) 2>$(NUL)\n",
module.name.c_str() );
+
if( ProxyMakefile::GenerateProxyMakefile(module) )
{
DirectoryLocation root;