automake
[Top][All Lists]
Advanced

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

Re: development work flow


From: Ralf Wildenhues
Subject: Re: development work flow
Date: Mon, 11 Jan 2010 20:38:24 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hello Martin,

* Martin Kalbfuß wrote on Sun, Jan 10, 2010 at 10:59:52PM CET:
> I like to know if
> 
> make & make install & program_name
> 
> is the typically development work flow.

For many developers, I guess so.  (If you meant the above literally,
then you need to use && instead of &.)

However, autotools explicitly support running uninstalled programs.
One rationale is that you don't want to install potentially-buggy
software.  (One workaround for this is to install the development code
into private locations, using a different configure --prefix.)

> I'm not sure if the program should get installed. If not, I don't know
> how to the program should find the data files properly.
> 
> I'm generally not sure how the compiled program should find it's data
> files. passing something to config.h, use an environment variable or
> something similar?

Typically, you either allow to pass a command line argument to your
program that overrides the installed location of your data, or an
environment variable.  One way to automate this in your build tree is to
write a small shell wrapper for your program that calls your program
with this argument/variable set.  For example, the Autoconf and the
Automake packages both do it this way: they create small shell scripts
in their respective tests/ directories (named autoconf, autoreconf,
aclocal-$APIVERSION, automake-$APIVERSION), which invoke the uninstalled
programs with some variables or command lines arguments set.

Hope that helps.

Cheers,
Ralf




reply via email to

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