%% Eric Venditti <[EMAIL PROTECTED]> writes:

  ev> MYTARGET = $(shell pwd | awk -F'/' '{print $NF}' )

You have to escape the variable intro char here, just like in command
scripts, if you want it to go to the shell.  Make is expanding the
make variable "$N" here.  Use:

  MYTARGET = $(shell pwd | awk -F'/' '{print $$NF}' )
                                             ^^

However, you don't want that.  You at least should use ":=":

  MYTARGET := $(shell pwd | awk -F'/' '{print $$NF}' )

so that the subshell is only run once.

And, you don't even need a subshell, why not just use:

  MYTARGET := $(notdir $(CURDIR))

This requires GNU make 3.77 or better (the current best version is
3.79.1).

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          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

_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to