[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to automatically generate package version, calling AC_INIT
From: |
Raja R Harinath |
Subject: |
Re: how to automatically generate package version, calling AC_INIT |
Date: |
Sun, 27 Apr 2003 09:33:02 -0500 |
User-agent: |
Gnus/5.090019 (Oort Gnus v0.19) Emacs/21.3.50 (gnu/linux) |
Hi,
Joost van Baal <address@hidden> writes:
[snip]
> So, I now do, in configure.ac:
>
> m4_include([VERSION.m4])dnl
> AC_INIT([My Package],
> [VERSION],
> address@hidden,
> [mypackage])
> AM_INIT_AUTOMAKE
>
> and in ./bootstrap, I have
>
> echo 'm4_define([VERSION], ['`date +%Y%m%d`'])' > VERSION.m4
>
> However, this breaks:
>
> % autoconf
> % ./configure
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking whether make sets $(MAKE)... yes
> ./configure: line 1413: 20030426=: command not found
> checking for working aclocal-1.4... found
> checking for working autoconf... found
> checking for working automake-1.4... found
> checking for working autoheader... found
> <snip>
>
> Indeed,the generated ./configure has a line:
>
> 20030426=
[snip]
> Anybody got a clue on how to get this going? Why does the value in the
> m4_define get used as a shellvariable name in configure? How can I find
> out for myself?
There's a line somewhere
VERSION=...
probably in one of the automake m4 macros. Since m4 is a pure text
macro processor, without any understanding of shell syntax, it just
goes ahead and replaces the string 'VERSION' with the its
'm4_define'd value. Try using a different name in VERSION.m4.
- Hari
--
Raja R Harinath ------------------------------ address@hidden