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

How do I set a runtime variable in debian/rules



I'm trying to make the build for postgresql work independently of where the
source happens to be.  As a result of the current state of my efforts,
libpgperl (Perl module for PostgreSQL) is broken because the build has
put the package somewhere else than in the proper place.
(So don't load libpgperl-6.2.1-{10,11} if you use Perl and PostgreSQL)

I want to set a variable in the rules file to the current directory, but
I cannot find how to do it.  Makefile documentation doesn't seem to cover
the point.

If I say

  HERE = `pwd`

HERE gets re-evaluated every time it is referenced, so it changes its value
when the make changes directory.

On the other hand 

  HERE = $(PWD)

works, but only if I do

  export PWD

before I start the build.  If I were doing something for myself, that would
be no problem, but debian/rules ought to be self-contained and someone else
should not have to do anything except `build' to make it work.


So,  is there any way to set a variable in a makefile to `pwd` but only
have it evaluated once?


-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver

PGP key from public servers; key ID 32B8FAA1



--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: