[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A bug in gmake?
From: |
Story, Peter |
Subject: |
A bug in gmake? |
Date: |
Thu, 11 Mar 2004 09:47:35 +0100 |
I *believe*
this shows a bug in gmake in the maintenance of archives.
GNU Make version 3.79.1, by
Richard Stallman and Roland McGrath.
Built for
i386-redhat-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92,
93, 94, 95, 96, 97, 98, 99, 2000
Free Software
Foundation, Inc.
This is free software; see the source for
copying conditions.
There is NO warranty; not even for
MERCHANTABILITY or FITNESS FOR A
PARTICULAR
PURPOSE.
running on
Linux SISPC1.ks-t.no 2.4.21-4.EL
#1 Fri Oct 3 18:13:58 EDT 2003 i686 i686 i386 GNU/Linux
Run the showbug script, this is what I
see:
Here is the makefile, which uses
the fast library maintenance strategy suggested
in
O'Reilly's Managing Projects with Make, 0-937175-90-0, 1991
edition,
in the 'Nullifying Rules' section. This works
fine on other makes I have used.
--------------------
libsicom.a:
libsicom.a(parser.o)
$(CC) -c
$(CFLAGS) $(?:.o=.c)
ar rv $@ $?;
rm -f $?
.c.a:;
--------------------
here are the files we
use
total 100
-rw-rw-r-- 1 petes
forsvar 34 Mar 11 09:23
stdmakefile
-rw-rw-r-- 1
petes forsvar 42572 Mar 11 09:23
parser.c
-rw-rw-r-- 1
petes forsvar 99 Mar
11 09:23 makefile
-rw-rw-r-- 1
petes forsvar 38128 Mar 11 09:23
lex.lc
-rw-rw-r-- 1
petes forsvar 637 Mar 11
09:35 ReadMe.txt
-rwxrwxr-x 1
petes forsvar 972 Mar 11
09:38 showbug
--------------------
create a library with something in it, not parser.o
a -
junk.o
--------------------
show the
library contents ...
rw-rw-r-- 5732/302 17648 Mar 11
09:39 2004 junk.o
--------------------
ask make what it has to do to make
the library ...
cc -c
parser.c
ar rv libsicom.a parser.o; rm -f
parser.o
--------------
ask
it to do that and watch it fail to do so ...
cc
-c
cc: no input
files
make: *** [libsicom.a] Error 1
--------------
ask it to make the library with the slow
inbuilt rules and watch it work ...
cc
-c -o parser.o parser.c
ar rv libsicom.a
parser.o
a - parser.o
rm
parser.o
I ask make how it would build the library and it
tells me the correct answer.
Then I ask it to do it, and it can't.
What's going on?
Hope somebody feels inspired to find this one, we
have lots of libraries
to move to gmake, and the many at a time technique is
quite a lot more
effective
Cheers
Pete
gmakebug.tar.gz
Description: gmakebug.tar.gz
- A bug in gmake?,
Story, Peter <=