[Top][All Lists]

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

Re: AC_INIT receiving PACKAGE_VERSION from outside

From: Bruno Haible
Subject: Re: AC_INIT receiving PACKAGE_VERSION from outside
Date: Fri, 18 Mar 2005 13:39:07 +0100
User-agent: KMail/1.5

Alexandre Duret-Lutz wrote:

> AC_INIT([foobar], m4_normalize(m4_include([version])))
> And write down your version string in the `version' file.

Ah, thanks for the great trick!

> (m4_normalize strips extra spaces and new lines.)

The call to m4_normalize appears to be needed, since usually a file or an
esyscmd output ends in a newline. But it is not documented. Could in be
documented in the autoconf manual?

>   2) you don't break `autoconf --trace AC_INIT' so any build tool can
>      retrieve your version without knowing where it is stored.

... assuming these build tools are run from the same directory. If a tool
is run from a subdirectory, it needs to m4_include([../version]) instead.

> Beware that sourced shell scripts add hidden dependency to
> ./config.status.

Yes, we add a dependency from to config.status.

> Almost no I have seen sourcing a version script do define

Thanks for the tip. I missed that too :-)


reply via email to

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