Hi,

I found that weird behavior while experimenting with the static rules
capabilities and I'm not sure if it is a bug or a feature. Here is a
simple testcase:

        % cat Makefile
titi.test : %.test : %.testsrc
        echo "special test" 

%.test : %.testsrc
        echo "normal test"

%.testsrc:
        touch $@


        % make titi.test
touch titi.testsrc
echo "special test" 
special test


        % make toto.test
touch toto.testsrc
echo "normal test"
normal test
rm toto.testsrc

        % touch toto.ksrc ; make toto.test
touch toto.testsrc
echo "normal test"
normal test


The static rule seems to behave as I would expect. But the non static
one automatically does a rm of the dependency...
This happens with both v3.79 and v3.80. This is not platform specific.
The run with the -p option does not provide a clue about that extraneous
rm ...

if the makefile is updated to actually create the %.k targets:

        % cat Makefile
titi.test : %.test : %.testsrc
        echo "special test" > $@

%.test : %.testsrc
        echo "normal test" > $@

%.testsrc:
        touch $@
        

Then the running "make toto.test" will create toto.test and remove
toto.testsrc. Running the command "make toto.test" a second time will
simply ignore the missing dependency toto.testsrc and simply print that
the target is up to date...

Am I missing something?

Let me know if you need more informations.

Thanks,

        kifof




-- 
------------------------------------------+---_-----------+--------
| Christophe Vial                 |       | c a d e n c e |       |
| Cadence Design Systems          |       +---------------+       |
| 555 River Oaks Parkway          | Tel    : (408) 428 5182       |
| Building 2 - (Cube 22203)       | Fax    : (408) 428 5656       |
| San Jose, CA 95134              | e-mail : [EMAIL PROTECTED]    |
-------------------------------------------------------------------


_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to