[Top][All Lists]

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

missing dependency in a very unusual case

From: Jim Meyering
Subject: missing dependency in a very unusual case
Date: Wed, 09 Mar 2005 09:51:41 +0100

Hi Alexandre!

In coreutils, I've just removed argmatch.[ch] from the list of
sources in lib/  Those files are still being used,
it's just that the build tools now learn of that fact via these
lines in the new file, m4/argmatch.m4:

  AC_LIBSOURCES([argmatch.c, argmatch.h])

So I reran make from the top and it rebuilt libfetish.a, but without
argmatch.o, so there were link failures in src/.

Whoops.  I'd forgotten to AC_REQUIRE the new macro.
So I did that and reran `make'.  Surprise!  In lib/,
it did not rerun `ar' to update the .a file, so the link
failures in src/ persisted.

Of course, once I removed lib/libfetish.a and rebuilt, everything was fine.

I'm not sure it's worthwhile, since this is such an unusual scenario,
but in case you're interested, here's an untested patch that adds
the missing dependency:

2005-03-09  Jim Meyering  <address@hidden>

        * lib/am/ (%LIBRARY%): Also depend on Makefile, for
        the unusual case in which %XLIBRARY%_OBJECTS includes .o files
        that already exist and are up to date and that are not in an
        up-to-date %LIBRARY% file.

Index: lib/am/
RCS file: /cvs/automake/automake/lib/am/,v
retrieving revision 1.15
diff -u -p -r1.15
--- lib/am/   2 Jun 2003 07:08:40 -0000       1.15
+++ lib/am/   9 Mar 2005 08:44:23 -0000
@@ -1,5 +1,6 @@
 ## automake - create from
-## Copyright (C) 1994, 1995, 1996, 1999, 2003 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1999, 2003, 2005
+## Free Software Foundation, Inc.
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -15,7 +16,7 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
        -rm -f %LIBRARY%
        $(RANLIB) %LIBRARY%

reply via email to

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