automake
[Top][All Lists]
Advanced

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

Re: Dealing with uninstalled data


From: Mathieu Lirzin
Subject: Re: Dealing with uninstalled data
Date: Mon, 30 Oct 2017 12:45:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Victor Porton <address@hidden> writes:

> What is the best way to debug a program which uses some data files,
> while the program is not yet installed?
>
> For example I have data/classes.ttl to be installed into
> /usr/local/share/boiler/classes.ttl
>
> How can I make my program to use this classes.ttl while it is not yet
> installed?
>
> Maybe, I should lookup in current directory? But that's insecure. Maybe
> I should lookup in current directory only in maintainer mode?

I would recommend using environment variables to override the default
installed directories.  To run you program from build directory can then
use a wrapper script that sets those environment variables appropriately
and call your progam this script can be used for running tests too.  As
an example you can see the 'pre-inst-env' script of Automake [1] which
is generated at configure time.

HTH,

-- 
Mathieu Lirzin
GPG: F2A3 8D7E EB2B 6640 5761  070D 0ADE E100 9460 4D37

[1] https://git.savannah.gnu.org/cgit/automake.git/tree/pre-inst-env.in



reply via email to

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