bug-make
[Top][All Lists]
Advanced

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

Re: Please add :sh to the "problems and incompatibilities.


From: Paul D. Smith
Subject: Re: Please add :sh to the "problems and incompatibilities.
Date: Wed, 11 Jul 2001 15:27:28 -0400

%% "Jeff Wiegley, Ph.D." <address@hidden> writes:

  jwpd> I am suprised to find out that make is not as backward
  jwpd> compatible as I thought.

You mean, not as compatible as you thought.

There's nothing "backward" about it.

  jwpd> Especially since it doesn't support the *only* method that make
  jwpd> under Solaris uses to incorporate command substitution.

So?  Why should GNU make try any harder to be compatible with Solaris
than it would with any other UNIX platform?

GNU make conforms to the POSIX.2 specification of the "make" utility,
and it adds a very large number of enhancements.

But it is definitely not a goal to be a drop-in replacement for any
other version of make, including Solaris make.

  jwpd> This makefile works under Solaris but not under any version of
  jwpd> GNU make that I have tried...

This makefile also won't work with makes on AIX, HP-UX, Irix. DG-UX,
FreeBSD, etc. etc.

If you use system-specific features, your environment isn't portable,
it's as simple as that.

  jwpd> I know that GNUmake supports command substition using $(shell
  jwpd> /bin/date) but why not also support the :sh syntax?

Because that syntax is gross and a hack, and makes the parser more
complex and adds weird special cases.

GNU make already has a simpler, cleaner, saner syntax to do the same
thing.

  jwpd> This seems like a pretty big hole since every makefile written
  jwpd> on a Solaris platform that uses any shell output will contain
  jwpd> :sh. Seems like a pretty big incompatibility to me. What's the
  jwpd> deal here?

There are many things that Solaris make supports that GNU make
doesn't--and vice versa.  There are many things that Solaris make
supports that _no_ other version of make does.

This is not a bug.

It's actually a quite straightforward query/replace operation to
translate this syntax from Solaris form to GNU make form--and you only
have to do it once no matter how many platforms you decide to port to
(since you can build GNU make on all of them).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist



reply via email to

[Prev in Thread] Current Thread [Next in Thread]