tech-toolchain archive

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

Re: bmake bug with expanding pattern macro replacements



    Date:        Mon, 27 Apr 2020 15:53:54 +0200
    From:        (Joerg Schilling) <schily%schily.net@localhost>
    Message-ID:  <20200427135354.lUzi2%schily%schily.net@localhost>

  | Ancient make does not support any kind of substitution.

I didn't mean *that* ancient...

  | A second % on the left hand side is taken literarily,
  | the right side supports any number of % (0..what you like).
  |  
  | > Is any of this stuff actually specified anywhere?
  |
  | in POSIX ;-)

Not in the standard.  In the proposed new test for Issue8 (which is
yet to be balloted and approved).

  | Ir of course the SunPro Make man page.

Not exactly useful.

Does any of this (well, does the SunPro doc - I know the posix proposed
text doesn't, and nor does the smake doc) specify the technique to get
a literal '%' (before the "match" operator) or a literal '=' in subst1 ?

The BSD doc (and only it that I'm aware of) says that to get a literal '$'
it needs to be written as \$ not the usual $$ that's used elsewhere in
make - that should be in the posix spec as well, assuming it is in bmake
because that's how it is done in SysV make (which is the only explanation
I can imagine for that behaviour deviation).

What do other makes actually do with multiple %'s in subst2 ?   The posix
text (proposed) says it is unspecified whether only the first is
substituted, or whether all are (but leavs only those two choices).
And how does one get a literal '%' in subst2 ?

kre

ps: the posix bug needs to be reopened, the text proposed is not nearly 
adequate.



Home | Main Index | Thread Index | Old Index