[GRASS5] Gmake is not Gnu Make
Thierry Laronde
tlaronde at polynum.com
Tue Nov 18 10:22:20 EST 2003
On Mon, Nov 17, 2003 at 08:40:10PM +0000, Glynn Clements wrote:
> >
> > What are the plans for the future? Keep this compatibility (I'm
> > personnally against automake and the hell) or use more elaborate (why?)
> > features that will not be portable?
>
> 5.7 doesn't use gmake5 or Gmakefiles. It just uses GNU Makefiles.
>
> For a sane build system, we realistically need to insist upon a make
> which:
>
> 1. Uses a Bourne shell for executing the commands.
POSIX susv3 specifies that the special macro SHELL shall be defined
internally by make to point to the command line interpreter 'sh', and
the standard points to the POSIX definition which is a Bourne shell.
So, if I'm not mistaken, a standard make shall interpret the commands
via a Bourne compatible shell. But the standard is not really clear
(this is only infered). But I think the practice is more clear (and at
least POSIX specifies that the environment variable SHELL has nothing to
do here and shall not be mixed with it).
>
> 2. Provides an "include" feature.
POSIX shell is a very restricted subset of the make utilities. And there
is no POSIX include target.
But I had the surprise to see `include' accepted by the FreeBSD make,
when I thought that only '.include' was accepted. The reason is:
SYSVINCLUDE
* Recognize system V like include directives [include "filename"]
that is a SysV compatibility defined at compile time.
So this may or may not be present on different BSD flavors.
>
> 3. Provides an adequate syntax for pattern rules.
I suspect this is were there would be a lot of difference and perhaps no
common case (and there is no POSIX standardisation).
>
> We should make a reasonable attempt to support any make program which
> meets the above requirements. Over-engineering the build system in
> order to support every make program in existence (which is basically
> the case for gmake5) isn't worth it. OTOH, we shouldn't insist upon
> GNU make just because we don't want to bother with relatively minor
> compatibility issues.
Well, I think that there is two alternatives (and only two, nothing in
the middle):
- whether go the traditionnal Grass make way, that is letting bourne
shell script constructs portable makefiles;
- or adopt one between multiple flavors, i.e. GNU make or P make since a
syntax working on one may fail on the other.
By the way, the new sketch directory for make include files is more a
BSD one.
But, have mercy! no automake around there! ;)
--
Thierry Laronde (Alceste) <tlaronde at polynum.org>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C
More information about the grass-dev
mailing list