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:        Fri, 01 May 2020 14:49:37 +0200
    From:        (Joerg Schilling) <schily%schily.net@localhost>
    Message-ID:  <20200501124937.1FkrX%schily%schily.net@localhost>

  | This is simple, the interface works modular, so just use SYSv and pattern 
  | replacement nested together.

Assume I want to do

	${var:abc%def=pqr%-\%-%xyz}

(where the \% has the obvious intended meaning, not how it works in smake)
and explain how to do that (given that "var" might possibly not start with
abc or end with def, or might) using the technique you suggested?

  | BTW: do you have a real life example where you need a percent in such a 
  | replacement?

I don't have a real life example of anything which uses SysV match and
replace.

But I'd never call an interface "well designed" if there are simple
things that it relies upon "do you have a real life example" to handle,
instead of implementing a solution.

There are times when the pragmatics of incorporating a new feature
mean that one must rely upon there being a very small possibility that
any real code is using some feature, or not do anything - here that
includes var names not including the ':' char (which is reasonable) but
once you have a blank slate, which existed here after the ${var:...}
started inventing meaning for the elipsis, then all possibilities should
be handled, however unlikely you consider them to be.

  | I cannot confirm your interpretation of the background. Before gmake
  | has been introduced in 1989, the most widely available make
  | implementation has been SunPro Make

At that time, as I recall it, the most widely available make (if one
can call anything available when licensing restrictions still applied)
was Bell Labs make, which had none of this nonsense.

  | It may be, but unfortunately, I cannot check this, since not the apparently
  | 2 year old "bmake" has been modified,

I don't know the procedures for exporting the NetBSD make into bmake
so I cannot help with that.

  | What kind of proprietary software are you talking about?

SunPro, back at the time any of this mattered (long before Solaris
was open sourced).   And you know that.

kre



Home | Main Index | Thread Index | Old Index