make-alpha
[Top][All Lists]
Advanced

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

addsuffix manual example wrong, se_implicit test 4 fails.


From: John E. Malmberg
Subject: addsuffix manual example wrong, se_implicit test 4 fails.
Date: Wed, 17 Sep 2014 20:34:06 -0500
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

This was noticed on make help in 2010.

http://gnu-make.2324884.n4.nabble.com/There-is-a-bug-in-the-make-manual-td11187.html

In the section on Secondary Expansion of Implicit Rules:

In this example:

     .SECONDEXPANSION:

     /tmp/foo.o:

     %.o: $$(addsuffix /%.c,foo bar) foo.h
             @echo $^

It is claimed that $$(addsuffix /%c,foo bar) for the stem '/tmp/foo' will expand to '/tmp/foo/foo.c /tmp/bar/foo.c'.

It actually expands to 'foo//tmp/foo.c bar//tmp/foo.c', which means the example does not work.

I tested this behavior with make 3.81 on Ubuntu 14.04 LTS.

This same example is test #4 in the se_implicit test, and it is failing for me on the Make 4.0.0. The debugger confirms that addsuffix is working the same as what I see on 3.8.1, which implies that this test should not pass.

Am I missing something here?

Even though this was noticed in 2010, I could not find a ticket for it.

Regards,
-John
address@hidden




reply via email to

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