|
|
| Welcome to the Monastery | |
| PerlMonks |
Getting rid of Perl in Makefilesby mwah (Hermit) |
| on Oct 24, 2007 at 07:29 UTC ( #646845=perlquestion: print w/ replies, xml ) | Need Help?? |
|
mwah has asked for the
wisdom of the Perl Monks concerning the following question:
Hi Monks, I have a somehow "inverted" Perl problem here. I have a lot of small applications I wrote over the time that depend on a bunch of common source files (tools). This is stuff where I never bothered to "autoconf" anything and which is expected to run on both win32 and Unix/Linux (for win32, there will be VC6/VC2005 config stuff in the appropriate dirs). When using an Unix/Linux Makefile template (since aeons), I throwed in at some point a line that determines the applications name which is going to get built. E.g.: If I have an Unix app to build in "../sources/applications/worlddomination":
there will be a (generic) Makefile in the "./worlddomination/unix" directory that emits a:
and makes an application "worlddomination" (does in most cases work). I'm not a makefile guru and therefore my question: How can this be done *simpler* with one or two shell commands (I feel the Perl invocation of ${shell perl -MCwd -e 'print +(split/\//,cwd)[-2]'} is somehow a big hammer for this purpose). Regards & Thanks mwa
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||