[Top][All Lists]

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

Possible make bug?

From: Pete Johnson
Subject: Possible make bug?
Date: Wed, 22 Jun 2005 19:08:30 -0700
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

I am having a problem with a makefile which appears to be a bug with make. Unfortunately, I can't compile make from CVS because of problems with automake on Fedora Core 4. I have tried this with the 3.81beta2 release though.

I have attached the makefile in question. To run the test, first make setup. This will create a list of source files and a dependency in a subdirectory. Next make the level4 target. Make complain about circular dependencies on dep.x. I don't see how this dependency is circular. On make 3.80, if you define funny to be 1 (make -f level4 funny=1) the problem goes away. Not so with 3.81beta2. Also, if you change the target for %.3 or %.4 to depend on depdir/dep.x rather than picking it up from the vpath then everything works.

Can anyone shed some light on this?


files = a.1 b.1 c.1 d.1

        mkdir -p depdir
        touch $(files) depdir/dep.x

command = echo $^ > $@

%.2: %.1 dep.x

%.3: %.2 dep.x

%.4: %.3

level4: $(files:.1=.4)

ifeq ($(funny),1)
level3: $(files:.1=.3)

        rm -f $(files:.1=.2) $(files:.1=.3) $(files:.1=.4)

.PHONY: level4

vpath %.x depdir

reply via email to

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