http://www.perlmonks.org?node_id=646859


in reply to Getting rid of Perl in Makefiles

Hopefully this will work inside your Makefile: if I'm in a certain directory I can type

basename `pwd`
and I get just the cwd name.

non-Perl: Andy Ford

Replies are listed 'Best First'.
Re^2: Getting rid of Perl in Makefiles
by mwah (Hermit) on Oct 24, 2007 at 10:14 UTC
    andyford
    I can type basename `pwd` and I get just the cwd name.

    Perfect, this does almost what I need.

    I only had to change the dir level (up one) in the backticks, like

    ... APPNAME = ${shell basename `cd .. ; pwd`} ...

    Fine!

    Regards & Thanks

    mwa