[clue-tech] Portability of shell expressions in a Makefile

Ed Hill ed at eh3.com
Mon May 9 07:17:43 MDT 2005


On Sun, 2005-05-08 at 23:20 -0600, Keith Hellman wrote:
> On Sun, May 08, 2005 at 10:32:44PM -0600, Matt Gushee wrote:
> > This has the desired effect in bash. Can anyone tell me if it will work 
> > with other Bourne-compatible shells? And while we're at it, how about 
> > non-GNU make implementations?
> 
> I can't comment on non-GNU make implementations cause I've haven't used
> one for years.  I wouldn't be surprised that most people do have it
> installed if they use any amount of FOSS software.

Echoing Keith's comments, two projects that I'm involved with build on a
lot of different Unix-es and Unix-likes and their policies are:

 - GNU make is easy to build and install just about anywhere 
   so we highly recommend it and don't put too much effort 
   into dealing with other (lesser?) makes

 - we do try to use least-common-denominator Bourne shell syntax
   for shell scripts and the O'Reilly Bash book does a pretty 
   good job of describing what is specific to bash v2 (which we 
   then avoid)

The rest as just been trial-and-error [:-/].

Ed

-- 
Edward H. Hill III, PhD
office:  MIT Dept. of EAPS;  Rm 54-1424;  77 Massachusetts Ave.
             Cambridge, MA 02139-4307
emails:  eh3 at mit.edu                ed at eh3.com
URLs:    http://web.mit.edu/eh3/    http://eh3.com/
phone:   617-253-0098
fax:     617-253-4464




More information about the clue-tech mailing list