bug in documentation - eval function

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

bug in documentation - eval function

Piotr Jankowski
Hi,

I possibly discovered a bug in the documentation on the manual page hosted at:

In the example makefile:
define PROGRAM_template =
 $(1): $$($(1)_OBJS) $$($(1)_LIBS:%=-l%)
 ALL_OBJS   += $$($(1)_OBJS)
endef

Should probably be without the equals sign like so:
define PROGRAM_template
 $(1): $$($(1)_OBJS) $$($(1)_LIBS:%=-l%)
 ALL_OBJS   += $$($(1)_OBJS)
endef

At least on GNU Make 3.81 the one with the equal sign does not work. It does not cause a visible error but does not work.

Thanks,
Piotr Jankowski
 
Reply | Threaded
Open this post in threaded view
|

Re: bug in documentation - eval function

Paul Smith-43
On Wed, 2021-01-13 at 09:18 +0100, Piotr Jankowski wrote:
> At least on GNU Make 3.81 the one with the equal sign does not work.
> It does not cause a visible error but does not work.

It works fine for all versions of GNU make 3.82 and above; 3.82 was
released in July 2010.  The online manual documents the current latest
version of GNU make (4.3) and there are many things in the manual which
won't work with GNU make 3.81, which was released in April 2006.

If you need to use an older version of GNU make you should also use the
version of the manual which was provided with that version (every
version of GNU make comes with the manual, and that version of the
manual documents that version of GNU make).

Cheers!