[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A bug in gmake?
From: |
Paul D. Smith |
Subject: |
Re: A bug in gmake? |
Date: |
Sun, 14 Mar 2004 18:02:46 -0500 |
%% "Story, Peter" <address@hidden> writes:
sp> I *believe* this shows a bug in gmake in the maintenance of archives.
sp> GNU Make version 3.79.1, by Richard Stallman and Roland McGrath.
sp> libsicom.a: libsicom.a(parser.o)
sp> $(CC) -c $(CFLAGS) $(?:.o=.c)
sp> ar rv $@ $?; rm -f $?
sp> .c.a:;
sp> create a library with something in it, not parser.o
sp> a - junk.o
sp> --------------------
sp> show the library contents ...
sp> rw-rw-r-- 5732/302 17648 Mar 11 09:39 2004 junk.o
Why are you doing this step (creating junk.o)? Is that important
somehow to show the bug?
sp> ask make what it has to do to make the library ...
sp> cc -c parser.c
sp> ar rv libsicom.a parser.o; rm -f parser.o
sp> --------------
sp> cc -c
sp> cc: no input files
sp> make: *** [libsicom.a] Error 1
sp> --------------
sp> cc -c -o parser.o parser.c
sp> ar rv libsicom.a parser.o
sp> a - parser.o
sp> rm parser.o
sp> I ask make how it would build the library and it tells me the
sp> correct answer. Then I ask it to do it, and it can't. What's
sp> going on?
No idea. It works fine for me; here's the test I used:
$ cat Makefile
libsicom.a: libsicom.a(parser.o) ; @echo '$$? = $?'
.c.a:;
$ touch parser.c
$ make
parser.o
Just as expected.
Does my example show the same error as yours, on your system?
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- A bug in gmake?, Story, Peter, 2004/03/13
- Re: A bug in gmake?,
Paul D. Smith <=