It seems like gmake on at least Fedora 15 and openSuSE 11.4 behaves slightly
differently so that gyp rebuilds are always non-incremental.
This is due to $(prereq_changed) always being true, which is due to a
difference in how $? behaves for phony rules: in make on e.g. ubunutu, if the
rule will otherwise not be run, FORCE_DO_CMD is not included in $?, while on
openSuSE at least it seems to be.
Suggested patch:
--- pylib/gyp/generator/make.py (revision 890)
+++ pylib/gyp/generator/make.py (working copy)
@@ -279,7 +279,7 @@
# so we can check their command lines.
# $? -- new prerequisites
# $| -- order-only dependencies
-prereq_changed = $(filter-out $|,$?)
+prereq_changed = $(filter-out FORCE_DO_CMD, $(filter-out $|,$?))
# do_cmd: run a command via the above cmd_foo names, if necessary.
# Should always run for a given target to handle command-line changes.
Make testcase --- make sure to touch foo.c && touch foo.o before using this.
all: foo.o
.PHONY: FORCE_DO_CMD
FORCE_DO_CMD:
%.o: %.c FORCE_DO_CMD
echo "dollar-bar:" $|
echo "dollar-question:" $?
On ubuntu 10.04, the output is:
echo "dollar-bar:"
dollar-bar:
echo "dollar-question:"
dollar-question:
While on Fedora 15/SuSE 11.4 it is:
echo "dollar-bar:"
dollar-bar:
echo "dollar-question:" FORCE_DO_CMD
dollar-question: FORCE_DO_CMD
Original issue reported on code.google.com by morlov...@google.com on 2 Jun 2011 at 2:41
Original issue reported on code.google.com by
morlov...@google.com
on 2 Jun 2011 at 2:41