Re: AC_INIT receiving PACKAGE_VERSION from outside

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

 



Sam Steingold wrote:
> > AC_INIT([foobar], m4_normalize(m4_include([version])))
> >
> > And write down your version string in the `version' file.
>
> what if my version is more complex?
> e.g.
> --------------------------------------------------------------
> # Version number and release date.
> VERSION_NUMBER=2.33.83
> RELEASE_DATE=2005-03-14      # in "date +%Y-%m-%d" format
> --------------------------------------------------------------
> do I need something like this:
>
> syscmd([. version.sh; echo "${VERSION_NUMBER} ${RELEASE_DATE}">version])
> AC_INIT([foobar], m4_normalize(m4_include([version])))
> syscmd([rm -f version])

You can use esyscmd in this case:

  AC_INIT([foobar],
          m4_normalize(esyscmd([. ./version.sh; echo "${VERSION_NUMBER} ${RELEASE_DATE}"])))

Bruno



_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux