Hi,
Herbert Euler <[EMAIL PROTECTED]> writes:
> I encountered a problem using version.texi with GNU make: after
> changing the version of my project in configure.in GNU make has to be
> executed twice to get the correct version number in the info document.
> I had sent a mail to the bug-make mailing list, but I found changing
> the dependencies in automake generated Makefile.in a bit would also
> let the problem go away. I'm not sure if this is a bug of GNU make or
> automake now.
>
> When version.texi is used, the Makefile.in has a dependency tree like
> this:
>
> DOC: DOC.texi version.texi
> version.texi: stamp-vti
> stamp-vti: DOC.texi .../configure
The usual idiom in the rest of automake is to use something like this
for update-only-if-changed files:
version.texi: stamp-vti
@if test -f $@; then :; else rm -f $@; $(MAKE) stamp-vti; fi
Along with dealing with 'rm version.texi; make', this also ensures that
make executes some commands, thus preventing it from caching the
timestamps on version.texi.
I believe automake should use this idiom here too.
- Hari