[Top][All Lists]

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

Re: $sysconfdir substitution

From: Kip Warner
Subject: Re: $sysconfdir substitution
Date: Fri, 10 Jun 2016 14:08:29 -0700

On Fri, 2016-06-10 at 17:05 +1000, Peter Johansson wrote:
> Hi Kip,
> I have the following rule in my to generate a C header
> file.
> configmake.h: Makefile
>      $(AM_V_GEN)echo '#define BINDIR "$(bindir)"' > $@
> You could have a similar rule to generate a file suitable to source
> into 
> your script.

Hey Peter,

That looks good, but I really like the AC_CONFIG_FILES approach because
I think it looks cleaner. If I went your method it would be similar,
but I'd probably use sed instead.

What I ended up coming up with seems to work, albeit it is a bit ugly.

    SYSCONFDIR=`test "$prefix" = NONE && prefix=$ac_default_prefix; eval echo 
    AC_SUBST([sysconfdir], [$SYSCONFDIR])

Kip Warner -- Senior Software Engineer
OpenPGP encrypted/signed mail preferred

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

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