bug-libtool
[Top][All Lists]
Advanced

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

Re: Feature request: setting env vars for binary wrappers


From: Behdad Esfahbod
Subject: Re: Feature request: setting env vars for binary wrappers
Date: Thu, 17 Apr 2008 18:08:41 -0400

On Thu, 2008-04-17 at 16:59 -0500, Bob Friesenhahn wrote:
> Removed libtool-patches since there was no attached patch ...
> 
> > My use case is when users (or myself) want to run the
> > pango/pango-view/pango-view binary, by hand.  I can put a pango-view.sh
> > by its side, but users won't run it.
> >
> > We went through this all two years ago :).
> 
> I seem to have slept several times since then.
> 
> I see the value and my own project can make use of it.  Did you send a 
> patch?

Ralf was kind enough to write a patch for it.

> For my own application, I also need to 'cd' to a different directory 
> in order to run each test since my application uses a non-recursive 
> build and Automake does not make much provision for that when running 
> the tests other than to tell me where the top source directory is.  So 
> I have all of my test scripts source this ugly junk:
> 
> SRCDIR=`dirname $0`
> SRCDIR=`cd $SRCDIR && pwd`
> TOPSRCDIR=`cd $srcdir && pwd`
> cd tests || exit 1
> 
> However, I see that the environment variables and the requirements for 
> tests are different but that the tests need the environment variables.

Sure, even with recursive build, one needs to handle srcdir correctly
for out-of-tree builds.  I typically have:

test -z "$srcdir" && srcdir=.

in my script, and then this in my Makefile.am:

TESTS_ENVIRONMENT = srcdir="$(srcdir)"


behdad

> Bob
> ======================================
> Bob Friesenhahn
> address@hidden, http://www.simplesystems.org/users/bfriesen/
> GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
> 
-- 
behdad
http://behdad.org/

"Those who would give up Essential Liberty to purchase a little
 Temporary Safety, deserve neither Liberty nor Safety."
        -- Benjamin Franklin, 1759





reply via email to

[Prev in Thread] Current Thread [Next in Thread]