bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quirk with rules producing multiple output files


From: Roger Pepitone
Subject: Re: Quirk with rules producing multiple output files
Date: Wed, 3 Apr 2013 21:24:03 -0500

On Sun, Mar 10, 2013 at 12:19 PM, Roger Pepitone <address@hidden> wrote:
######################################

TEST_TEXTS := test1.txt test2.txt test3.txt

$(TEST_TEXTS) : xtest.txt
        echo "Rebuilding $@"
        touch $(TEST_TEXTS)

xtest: $(TEST_TEXTS)

clean-xtest:
        rm $(TEST_TEXTS)

######################################

make clean-xtest
make xtest
touch xtest.txt
make xtest


The first call to "make xtest" runs the rule 3 times, even though it
should only need to do it once.
The second call correctly only runs it once.

Is this correct behavior or a bug?  Is there a way to prevent it?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]