Hi,

I have a general rule to build a program based on a specific directory
structure. if I am in directory "/project/myproj/myprog1" I can build myprog1
and if I am in directory "/project/myproj/myprog2". For amintenance purpose I
want to have a common Makefile and get the target name from the directory name.

using " pwd | awk -F'/' '{print $NF}' " I can get the directory name on the
command line but when I try to do this in make it doesn't work.

In my Makefile I have:

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

myrule :
        @echo My target is ${MYTARGET}

What am I doing wrong?

Thanks,
Eric.

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

Reply via email to