bug-make
[Top][All Lists]
Advanced

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

RE: File timing bug


From: Martin Dorey
Subject: RE: File timing bug
Date: Mon, 9 Jun 2008 12:35:10 -0700

This example is certainly simple, thanks.

The Makefile isn't telling make that the rule for making c from d will
also update b.  Make caches modification times and doesn't know to
invalidate its cache of b's time.

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
Herbert Euler
Sent: Monday, June 09, 2008 02:36
To: address@hidden
Subject: RE: File timing bug


Hi,

Perhaps due to my long and annoying description, one has difficulty in
understanding what the problem I encountered was.  Here I would
provide a much shorter description.

GNU Automake generates dependency tree like this in Makefile.in:

  address@hidden:~/tmp/k$ cat Makefile
  a: b
          cat b>a
  b: c
  c: d
          date>b
          cp b c
  address@hidden:~/tmp/k$

Its intention is to regenerate `a' when `d' is updated.  But this does
not work, since it requires `make' to be executed twice:

  address@hidden:~/tmp/k$ make
  date>b
  cp b c
  address@hidden:~/tmp/k$ make
  cat b>a
  address@hidden:~/tmp/k$

However, I noticed that if the Makefile looks like this:

  address@hidden:~/tmp/k$ cat Makefile
  a: b
          cat b>a
  b: c
          cp c b
  c: d
          date>c
  address@hidden:~/tmp/k$

Everything works as expected:

  address@hidden:~/tmp/k$ touch d
  address@hidden:~/tmp/k$ make
  date>c
  cp c b
  cat b>a
  address@hidden:~/tmp/k$

Is this a bug in GNU make, or a bug in GNU Automake?

Regards,
Guanpeng Xu
_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE


_______________________________________________
Bug-make mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-make




reply via email to

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