TCLUG Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG-DEVEL:98] GNU Make and shell expansions



On Sat, Feb 19, 2000 at 01:02:14PM -0600, John R. Sheets wrote:
> How portable are the shell expansions that GNU Make uses, to other
> implementations of make?  I'm referring to these constructs:
> 
>  CURRENT_DIR=$(shell pwd)
>  CURRENT_DIR2=`pwd`
> 
> Both forms seem to work fine with GNU make.  Are they GNU-specific
> extensions, though?

	I've noticed that makes vary widely among platforms as to what
extensions they support.  I don't know if there is a POSIX standard for
make.

	For example, pattern rules (%.o : %.c) are not part of make as
it was originally written.  On the other hand, I think several makes
besides GNU actually support them.

	The same for the shell expansion thing.  Since that's a feature
that I'm much less familiar with, I don't know whether it's widely
supported or not.  But, even if it's a GNU specific thing, it's likely
that it will be eventually picked up by other makes, especially if it
becomes a popular feature.

	Writing a makefile that will work with any old vanilla make is
really hard.

Have fun (if at all possible),
-- 
Its name is Public Opinion.  It is held in reverence. It settles everything.
Some think it is the voice of God.  Loyalty to petrified opinion never yet
broke a chain or freed a human soul.     ---Mark Twain
-- Eric Hopper (hopper@omnifarious.mn.org  http://omnifarious.mn.org/~hopper) --

PGP signature