Eric Lavarde - Debian wrote: > Hello, > > I'm trying to add a 'get-orig-source' target to my debian/rules file, and > it looks like this: > > get-orig-source: > debian/export-freemind-cvs.sh 0.8.0+01 FM-0-8-0 > > It works quite fine, but the Debian policy manual specifies under [1] that > "This target may be invoked in any directory", and my target can obviously > only be invoked from the parent directory of 'debian', the given script is > 64 lines long, so I wouldn't like to put it in extenso in the rules file. > > Is there something like a $(dirname $0) construct in 'make', or can I > interpret the policy in the sense that the target may be invoked in any > directory, as long as it contains the debian directory? ;-)
How about:
get-orig-source:
[ -x debian/export-freemind-cvs.sh ] \
&& debian/export-freemind-cvs.sh 0.8.0+01 FM-0-8-0 \
|| echo "Bad dir, sorry"
I am only not sure whether echo is POSIX-shell command.
dam
--
Damyan Ivanov Creditreform Bulgaria
[EMAIL PROTECTED] http://www.creditreform.bg/
phone: +359(2)928-2611, 929-3993 fax: +359(2)920-0994
mob. +359(88)856-6067 [EMAIL PROTECTED]/Gaim
signature.asc
Description: OpenPGP digital signature

