Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Getting rid of Perl in Makefiles

by andyford (Curate)
on Oct 24, 2007 at 09:31 UTC ( #646859=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://646859]
help
Chatterbox?
[Corion]: marioroy: Heh, glad that you get enjoyment out of it! It's mainly a valve for me to vent some of the pressure ;-D
[Corion]: Oooh - note is interesting, at least in the sense that I will steal its command line interface for my own note taking app ;-D

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2017-08-16 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (265 votes). Check out past polls.

    Notices?