On 1/14/10 7:28 AM, Daniel Pocock wrote:
This is how I've been going about it: create $(top_srcdir)/ganglia.inc
like so:
FIXCONFIG = $(top)/scripts/fixconfig
You probably mean $(top_builddir)
%: %.tmpl $(FIXCONFIG)
$(FIXCONFIG) $<
AFAIU, %: %.tmpl is GNU Make specific and won't work with other makes.
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.
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?
http://sources.redhat.com/automake/automake.html#Extending-Installation
cheers,
Peter