Re: I need support with a planned POSIX make extension

Andrew Cagney <[email protected]>
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <CAJeAr6taA+wqkhEdo8YuHEi69aCARFHTZ+evkBd3Fw=CbTmkCg@mail.gmail.com>
On Fri, 6 Aug 2021 at 02:41, Joerg Schilling <[email protected]> wrote:

> David Holland <[email protected]> wrote:
>
> > On Mon, Aug 02, 2021 at 06:42:14PM +0200, Joerg Schilling wrote:
> >  > Do you believe that POSIX should include a method to control whether
> $$ is
> >  > expanded with := or not?
> >
> > I don't know the history of this (or at least, not without going and
> > raking it up) but I'd say that $$ should never be expanded except at
> > the final output stage. The purpose of $$ is to produce $ in the
> > output, not cater to monstrosities like $$$$$$$$(VAR) that depend on
> > knowing exactly how many and which eval stages are going to be applied
> > to your text.
>
> OK, from our discussions at the POSIX teleconferences, we came to the
> conclusion that using $$ is extremely rare
>

I find that .... puzzling.  If I was Living in the 70's, backtick would be
the norm for command substitution.  But I'm not. so Instead I use $() which
means $$() is common.

(and having combined that with GNU Make's define+eval which relies on $$,
yes I've ended up with plenty of monstrosities, mea culpa)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.