The problem is that make thinks that if one target is not out of date,
then none of the targets will need to be rebuilt by another parallel
make process.  For example, I have the following makefile:
.DELETE_ON_ERROR:

.PHONY: all
all: r.c s.c s.h
        cmp r.c s.c

%.c %.h:
        echo blah >$*.c
        echo blah >$*.h
        sleep 3
        echo blah >>$*.c

r.c: s.c
        sleep 1
        cp $< $@

And I run the following commands:
$ make
$ rm r.c s.h
$ make -j2

The output of the final make command is:
sleep 1
echo blah >s.c
echo blah >s.h
sleep 3
cp s.c r.c
echo blah >>s.c
cmp r.c s.c
cmp: EOF on r.c
make: *** [all] Error 1

In my real-world makefile, this can cause corruption of some of the
prerequisites of a command if I only delete some of the pattern
targets and not all of them.  Is this expected?  Thanks,

Jon.


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to