automake
[Top][All Lists]
Advanced

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

Re: [platform-testers] automake-1.16.92 released


From: Zack Weinberg
Subject: Re: [platform-testers] automake-1.16.92 released
Date: Mon, 01 Jul 2024 10:21:16 -0400
User-agent: Cyrus-JMAP/3.11.0-alpha0-566-g3812ddbbc-fm-20240627.001-g3812ddbb

On Sun, Jun 30, 2024, at 4:28 PM, Karl Berry wrote:
...
> introspection/%.h: introspection/%.c
>       $()
...
> As an aside, I'm curious as to why the $() is used. It seems
> a mysterious way to do nothing. Do you know?

I don't know why someone chose to do it this way, but I do know that
GCC's Makefiles do something similar with

# gen-foo generates both foo.h and foo.c at the same time
foo.c: gen-foo other files...
        $(builddir)gen-foo arguments...

# clue Make that gen-foo also updated foo.h whenever foo.c is new
foo.h: foo.c
        @:

If I had to guess, I would guess that someone thought Make would be more
likely to skip invoking a shell if the command was actually empty rather
than ":".  As it happens, GNU Make 4.4.1 appears to recognize ":" as a
no-op; using strace I see it issue the same number of forks for both
constructs.  But perhaps older versions of gnumake did not do this.
(This is clearly not a portable makefile to begin with, so questions of
what other implementations do are moot.)

zw



reply via email to

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