[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bmake bug with expanding pattern macro replacements
Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
> | The feature is well designed, but gmake does not implement it correctly.
> You didn't explain, and your example did not show, how one puts a
> literal % in subst2 (the replacement string). My tests using smake
> didn't produce anything that worked - of course, since nothing documents
> this (available to me) I'm just guessing and might not have guessed
> the appropriate magic.
This is simple, the interface works modular, so just use SYSv and pattern
replacement nested together.
BTW: do you have a real life example where you need a percent in such a
> | This is why the POSIX standard did call parts of it unspecified.
> That's normal when different implementations are different - which is
> what happens when the original implementation is not widely available
> and people only encounter it from examples they see, and have to guess
> what is intended to happen.
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 and it looks as if gmake created an implementation that was
sufficiently compatible to what was widely in use.
> I believe Christos fixed our version to be compatible with gmake
> (gmake is easily available to test against).
It may be, but unfortunately, I cannot check this, since not the apparently
2 year old "bmake" has been modified, but usr.sbin/make/* was changed and this
does not compile on UNIX. If there was a version that compiles and runs on
UNIX, I would be happy to comment the usability for the Schily Makefilesystem.
I know that previously, there have been several incompatibilities with the
standard behavior that prevented usability. Currently, this percent replacement
behavior is the first showstopper for bmake usability, but I need to be able to
check your current version...
> | shows that gmake implements a backslash to escape the patter funtion
> | but on the other side only supports "zero of one" instead of the
> | designed "any number of %"
> But no-one not using propriatary software knows about it. The smake
> man page certainly doesn't say anything about that.
What kind of proprietary software are you talking about? Are you talking about
gmake or bmake?
> It appears as if gmake also allows \ to escape a % on the RHS (in subst2)
> to escape a % (smake doesn't).
Correct, smake has been implemented after the documentation of SunPro Make
where this feature comes from and verified in tests.
> Since I doubt that anyone in the BSD world ever uses this archaic
> (and until recently, not really working) modifier form (given there
> are much better alternatives) perhaps that ought to be altered, so
> we're compatible with the others?
Well, if bmake was not as archaic as it currently is, it may become usable in
the Schily Makefile system. In other words, if bmake stays incompatible to
the current agreed minimal common ground, it can only be used by users from the
I am willing to help to change this, but this requires a version that I can
test on UNIX.
EMail:joerg%schily.net@localhost (home) Jörg Schilling D-13353 Berlin
joerg.schilling%fokus.fraunhofer.de@localhost (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/
Main Index |
Thread Index |