[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: get-orig-source to be called from any directory?

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:

         [ -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.

Damyan Ivanov                              Creditreform Bulgaria
divanov@creditreform.bg              http://www.creditreform.bg/
phone: +359(2)928-2611, 929-3993            fax: +359(2)920-0994
mob. +359(88)856-6067               dam@jabber.minus273.org/Gaim

Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: