automake
[Top][All Lists]
Advanced

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

Re: making config files


From: Daniel Pocock
Subject: Re: making config files
Date: Fri, 15 Jan 2010 17:34:41 +0000
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)



You probably mean $(top_builddir)
Thanks - I'll fix that one
%: %.tmpl $(FIXCONFIG)
 $(FIXCONFIG) $<

AFAIU, %: %.tmpl is GNU Make specific and won't work with other makes.
I realised the same thing and took it out
and put something like the following into each Makefile.am:

include $(top_srcdir)/ganglia.inc

bin_SCRIPTS = ganglia-config

The problem with doing this via a config script is that it will not honor a sequence such as:
./configure
make prefix=/opt
make install

because the value '/opt' will not propagate to the generated files. It is required by GNU Coding Standards, but of course something you can completely ignore as long as you don't claim you follow GCS.
Yes, I realise that would happen - that's why I'm trying to find another way to do it
However, things like ganglia-config should be generated during the install phase, although the default behavior for the _SCRIPTS primary appears to be processing ganglia-config.in during the build phase - is there a recommended way it can be influenced to delay processing until the install phase?


I don't understand why you are against creating files during 'make all', but couldn't automake's install-exec-local target help you here?
That is what I have done actually - but I wanted something more concise, e.g.

bin_GENSCRIPTS = script1 script2 script3

with all the logic happening behind the scenes. Currently I have to list a rule (at least two lines of code) for each of script1, script2, ...

My current implementation is now in SVN, would you mind having a quick look at my Makefile.am and gmond/Makefile.am? Is this the right way to use the install-* rules?

http://ganglia.svn.sourceforge.net/viewvc/ganglia/trunk/monitor-core/






reply via email to

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