help-make
[Top][All Lists]
Advanced

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

Re: How to detect program path?


From: Stephan Beal
Subject: Re: How to detect program path?
Date: Fri, 19 Aug 2011 12:39:44 +0200

On Fri, Aug 19, 2011 at 4:47 AM, narke <address@hidden> wrote:

> Only do that the first time in build directory is okay.  If the path
> really changed (by installed a new version of the compiler), the user
> can manually rerun something to get the updated path.  How to
> implement this?


This is largely the problem domain of tools like Autoconfig/automake (and
many, many others).

If you want cross-run persistence, the setting has to be saved somewhere (a
file or the environment). Make has no built-in support for such things, so
you'll need to build it yourself. Abstractly what you need to do is store
the config setting in its own makefile, e.g.:

config.make:

FOO ?= bar

And then:

include config.make

in your main makefile(s).

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/


reply via email to

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