bug-make
[Top][All Lists]
Advanced

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

BUG: Pattern rules incorrectly treat order-only prerequisites as normal


From: Marc Eaddy
Subject: BUG: Pattern rules incorrectly treat order-only prerequisites as normal prerequisites.
Date: Mon, 4 Jun 2012 13:53:47 -0700

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


reply via email to

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