bug-automake
[Top][All Lists]
Advanced

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

aclocal.m4 is up to date but older than prerequisites (was: automake/535


From: Ralf Wildenhues
Subject: aclocal.m4 is up to date but older than prerequisites (was: automake/535: Extract correct man section from files in MAN_MANS)
Date: Mon, 9 Mar 2009 22:14:52 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Let's drop the GNATS PR for this topic.

* Peter Breitenlohner wrote on Mon, Mar 09, 2009 at 10:04:28AM CET:
>
> I am using Automake together with an m4/ directory, and my top-level
> Makefile.am starts with 'ACLOCAL_AMFLAGS = -I m4'. Consequently the
> generated aclocal.m4 ends with several 'm4_include([m4/xxx.m4])'s.
>
> The problem is, that when any of these m4/*.m4 files is changed (and
> maintainermode is enabled explicitly or by default), then 'make' runs
> aclocal but doesn't update aclocal.m4 because that remains the same.  Thus
> aclocal is run again and again, quite inconvenient.
>
> IMHO a better alternative would be to touch aclocal.m4 and consequently run
> configure and automake once, but never again until some other files are
> changed.
>
> I found the present behaviour fairly annoying and would prefer if it could
> be changed as indicated above.  However, I am not quite sure how that would
> be done best: in aclocal or in the rule generated by autmoake?

I don't think current autotools have this behavior.  Can you please
post a small test case?

Quoting a comment from aclocal.in:

  # We try not to update $output_file unless necessary, because
  # doing so invalidate Autom4te's cache and therefore slows down
  # tools called after aclocal.
  #
  # We need to overwrite $output_file in the following situations.
  #   * The --force option is in use.
  #   * One of the dependencies is younger.
  #     (Not updating $output_file in this situation would cause
  #     make to call aclocal in loop.)
  #   * The contents of the current file are different from what
  #     we have computed.

Also, which system are you on, which make version do you use, and is it
perhaps the case that some files have the same timestamps?  make should
notice that aclocal.m4 has not been updated, and consequently not run
the other rules at all.  At least, GNU and BSD make behave this way.

IIRC make and aclocal have interesting semantic differences when files
have the same timestamp, maybe that's the reason for your issues?
(I don't remember the exact reason right now, but it was done
deliberately.)

Thanks,
Ralf




reply via email to

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