tech-toolchain archive

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

Re: Portable Makefiles (was: I need support with a planned POSIX make extension)



David Holland <dholland-tech%netbsd.org@localhost> wrote:

> On Sun, Aug 08, 2021 at 02:38:45PM +0200, Joerg Schilling wrote:
>  > bmake        currently mainly seems to fail to support that makefile 
>  >              system because there is no support for pattern matching 
>  >              default rules and there are significant deviations with
>  >              suffix rules that place their results into a directory
>  >              that is not the current working directory if make.
>  >              bmake could be supported, after it did add support for
>  >              pattern matching default rules. A related simplified
>  >              proposal exists in the POSIX bug tracking system.
> 
> By "pattern matching default rules" you mean gmake rules of the form
> "%.o: %.c"?

I am talking about the SunPro Make feature that was introduced in 
January 1986 and that was (as usual) not really correctly copied by gmake
around 1989. The description for SunPro Make is curently at page 33:

	http://schilytools.sourceforge.net/man/man1/make.1s.html

Smake implements a simplified version, see page 24:

	http://schilytools.sourceforge.net/man/man1/smake.1.html

that is suffucient for what is needed in portable makefiles.

Gmake has some crippled deviations that fortunately do not prevent 
usability in general.  

If you like to know more information about gmake deviations in this area,
please ask.

> As for suffix rules, a few years ago we had someone come through and
> dump "POSIX compliance" patches for suffix rules that both crippled
> the feature and broke the world, and the conclusion after that was
> that since POSIX apparently demands that the feature be crippled we
> were going to ignore it and move on.

I know that BSD makefiles for the base os depend on these deviations in bmake
that seem to have been IIRC inherited from pmake. A clean way to implement 
the fixes for suffix rules in bmake would be to switch them on only if .POSIX:
is in the makefile. So it may be possible to readtivate the patches you have 
in mind. For your information: I implemented the crippled gmake := assignment
operator under the POSIX name ::= in both smake and SunPro Make, but only in 
case that .POSIX: is seen.

For my needs with a portable makefile system, pattern matching rules would be
the right way to go.

This is why I am asking for support for a simplified version of the pattern 
matching rules.

Jörg

-- 
EMail:joerg%schily.net@localhost                  Jörg Schilling D-13353 Berlin
					Blog: http://schily.blogspot.com/
URL:  http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/



Home | Main Index | Thread Index | Old Index