Possible make bug?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible make bug?

Pete Johnson
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 foo.mk 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?

Thanks,

-Pete

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

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

command = echo $^ > $@

%.2: %.1 dep.x
        $(command)

%.3: %.2 dep.x
        $(command)

%.4: %.3
        $(command)

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

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

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

.PHONY: level4

vpath %.x depdir

_______________________________________________
Help-make mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-make
Reply | Threaded
Open this post in threaded view
|

Re: Possible make bug?

Boris Kolpackov
Pete Johnson <[hidden email]> writes:

> Can anyone shed some light on this?

Seems like a bug to me. Could you please submit a bug report at

http://savannah.gnu.org/projects/make


thanks,
-boris



_______________________________________________
Help-make mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-make
Reply | Threaded
Open this post in threaded view
|

Re: Possible make bug?

Paul Smith-20
%% Boris Kolpackov <[hidden email]> writes:

  bk> Pete Johnson <[hidden email]> writes:
  >> Can anyone shed some light on this?

  bk> Seems like a bug to me.

I agree.  I expect it's because both pattern rules depend on the dev.x
file, but this SHOULD work as far as I can see.

--
-------------------------------------------------------------------------------
 Paul D. Smith <[hidden email]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Help-make mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-make