autoconf
[Top][All Lists]
Advanced

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

Re: Future plans for Autotools


From: Paul Eggert
Subject: Re: Future plans for Autotools
Date: Mon, 25 Jan 2021 15:15:47 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

On 1/25/21 2:59 PM, Gavin Smith wrote:
Does this
work or does GNU make have other ways of doing this?  (It would be
better if it could be done without communicating via files.)  Is there
any way to set a Makefile variable from within a rule and then depend upon
that variable being set in other rules?

GNU Make supports variables defined via ::=, and an earlier section of a GNU makefile could compute CC and assign to it that way. This would handle the simple case you gave. Unfortunately there are other cases that would require intermediate files with current GNU Make. Still, the overhead in using files would be worth it (at least for me) if we could use make -j.

The ::= feature was added to POSIX ten years ago or so, so it could even be used in Makefiles intended to be portable to other new-enough POSIX-compatible platforms. It wouldn't work on older platforms, though.



reply via email to

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