Author: hyperion
Date: Tue Dec 15 00:02:28 2009
New Revision: 44594
URL:
http://svn.reactos.org/svn/reactos?rev=44594&view=rev
Log:
modified Makefile
New ${checkpoint} command to create an empty "checkpoint" file, to store the
last modified date of a make target
modified tools/rbuild/backend/mingw/rules.mak
Rules that output more than one file at once don't mix well with parallel builds:
serialize dependency checks through the use of checkpoint files. Fixes intermittent widl
issues in highly parallel builds
Bonus internal rbuild function that I had to commit one day or another
See issue #4994 for more details.
Modified:
trunk/reactos/Makefile
trunk/reactos/tools/rbuild/backend/mingw/rules.mak
Modified: trunk/reactos/Makefile
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/Makefile?rev=44594&r1=…
==============================================================================
--- trunk/reactos/Makefile [iso-8859-1] (original)
+++ trunk/reactos/Makefile [iso-8859-1] Tue Dec 15 00:02:28 2009
@@ -353,6 +353,7 @@
endif
export SEP = /
mkdir = -$(Q)mkdir -p
+ checkpoint = $(Q)touch
rm = $(Q)rm -f
cp = $(Q)cp
NUL = /dev/null
@@ -361,6 +362,7 @@
ROS_EMPTY =
export SEP = \$(ROS_EMPTY)
mkdir = -$(Q)mkdir
+ checkpoint = $(Q)copy /y NUL
rm = $(Q)del /f /q
cp = $(Q)copy /y
NUL = NUL
Modified: trunk/reactos/tools/rbuild/backend/mingw/rules.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/mingw…
==============================================================================
--- trunk/reactos/tools/rbuild/backend/mingw/rules.mak [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/backend/mingw/rules.mak [iso-8859-1] Tue Dec 15 00:02:28
2009
@@ -20,6 +20,7 @@
#(source)
RBUILD_name=$(basename $(notdir $(1)))
+RBUILD_noext=$(dir $(1))$(basename $(notdir $(1)))
#(source)
RBUILD_dir=${call RBUILD_fullpath,$(dir ${call RBUILD_compress_prefixes,$(1)})}
@@ -255,9 +256,12 @@
$(2): $${$(1)_precondition}
-${call RBUILD_intermediate_path_noext,$(2)}_c.c ${call
RBUILD_intermediate_path_noext,$(2)}_c.h: $(2) $(3) $$(widl_TARGET) | ${call
RBUILD_intermediate_dir,$(2)}
+${call RBUILD_intermediate_path_noext,$(2)}_c.c ${call
RBUILD_intermediate_path_noext,$(2)}_c.h: ${call RBUILD_intermediate_path_noext,$(2)}_c
+
+${call RBUILD_intermediate_path_noext,$(2)}_c: $(2) $(3) $$(widl_TARGET) | ${call
RBUILD_intermediate_dir,$(2)}
$$(ECHO_WIDL)
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H
${call RBUILD_intermediate_path_noext,$(2)}_c.h -c -C ${call
RBUILD_intermediate_path_noext,$(2)}_c.c $(2)
+ $${checkpoint} $$@>$(NUL)
${call RBUILD_CC,$(1),${call
RBUILD_intermediate_path_noext,$(2)}_c.c,,-fno-unit-at-a-time,${call
RBUILD_intermediate_path_noext,$(2)}_c.o}
@@ -268,9 +272,12 @@
$(2): $${$(1)_precondition}
-${call RBUILD_intermediate_path_noext,$(2)}_s.c ${call
RBUILD_intermediate_path_noext,$(2)}_s.h: $(2) $(3) $$(widl_TARGET) | ${call
RBUILD_intermediate_dir,$(2)}
+${call RBUILD_intermediate_path_noext,$(2)}_s.c ${call
RBUILD_intermediate_path_noext,$(2)}_s.h: ${call RBUILD_intermediate_path_noext,$(2)}_s
+
+${call RBUILD_intermediate_path_noext,$(2)}_s: $(2) $(3) $$(widl_TARGET) | ${call
RBUILD_intermediate_dir,$(2)}
$$(ECHO_WIDL)
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H
${call RBUILD_intermediate_path_noext,$(2)}_s.h -s -S ${call
RBUILD_intermediate_path_noext,$(2)}_s.c $(2)
+ $${checkpoint} $$@>$(NUL)
${call RBUILD_CC,$(1),${call
RBUILD_intermediate_path_noext,$(2)}_s.c,,-fno-unit-at-a-time,${call
RBUILD_intermediate_path_noext,$(2)}_s.o}
@@ -281,9 +288,12 @@
$(2): $${$(1)_precondition}
-${call RBUILD_intermediate_path_noext,$(2)}_p.c ${call
RBUILD_intermediate_path_noext,$(2)}_p.h: $(2) $(3) $$(widl_TARGET) | ${call
RBUILD_intermediate_dir,$(2)}
+${call RBUILD_intermediate_path_noext,$(2)}_p.c ${call
RBUILD_intermediate_path_noext,$(2)}_p.h: ${call RBUILD_intermediate_path_noext,$(2)}_p
+
+${call RBUILD_intermediate_path_noext,$(2)}_p: $(2) $(3) $$(widl_TARGET) | ${call
RBUILD_intermediate_dir,$(2)}
$$(ECHO_WIDL)
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H
${call RBUILD_intermediate_path_noext,$(2)}_p.h -p -P ${call
RBUILD_intermediate_path_noext,$(2)}_p.c $(2)
+ $${checkpoint} $$@>$(NUL)
${call RBUILD_CC,$(1),${call
RBUILD_intermediate_path_noext,$(2)}_p.c,,-fno-unit-at-a-time,${call
RBUILD_intermediate_path_noext,$(2)}_p.o}