%% "PATTON, BILLY \(SBCSI\)" <[EMAIL PROTECTED]> writes:

  pb> I have :
  pb> all :
  pb>         @cdir=$(PWD) ; \
  pb>         echo "cdir = '$(cdir)'" ;

  pb> cdir comes up empty every time.

Definitely.  You're still having problems visualizing the distinction
between the shell and make.

First, $(PWD) is not a standard make variable.  It may be set in your
makefile _IF_ your shell sets it before make is invoked (because make
inherits all the invoking program's environment variables as make
variables).  But this is not portable as not all shells set PWD.  The
make variable containing the working directory is $(CURDIR), not $(PWD).


Second, in the first line you set the SHELL variable "cdir".

In the second line you echo the MAKE variable $(cdir).

These are not the same _at all_.  Rewrite:

> all :
>         @cdir='$(CURDIR)' ; \
>         echo "cdir = '$$cdir'" ;

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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to