Hi,

This is related to
https://savannah.gnu.org/support/?func=detailitem&item_id=104345 except
that I am filing it as a bug. The following makefile works fine

*good.mk
*default: bin/a.out

bin:
    mkdir $@

bin/a.out: a.c | bin
    touch $@

*bad.mk
*default: bin/a.out

bin:
    mkdir $@

bin/%.out: %.c | bin
    touch $@

The first time I run "make -f good.mk" it creates bin and bin/a.out. The
second time does nothing, which is correct.

The first time I run "make -f bad.mk" it creates bin and bin/a.out. The
second time it creates bin/a.out, which is incorrect since bin has already
been created and is an order-only prerequisite.

Cheers,

\\Marc
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make

Reply via email to