Dear GNU team,
I just want to report a strange behaviour I met, using gmake version
3.78. Everything worked fine with version 3.77. You will find in the
attached tar file an example to produce the problem.
Configuration :
---------------
First of all, here it is my configuration. I run Redhat Linux 6.1 :
$ uname -a
Linux dclin01 2.2.12-20 #1 Mon Sep 27 10:40:35 EDT 1999 i686 unknown
$ /usr/local/bin/gmake --version
GNU Make version 3.78.1, by Richard Stallman and Roland McGrath.
Built for i686-pc-linux-gnu
Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
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.
Report bugs to <[EMAIL PROTECTED]>.
The "config.h" is provided in the tar file.
How to produce the problem :
----------------------------
$ cat Makefile
CC = gcc -Wall
OBJ = lib.o
all: test
lib.o: lib.c string.inc
test: test.o lib.a($(OBJ))
$(CC) -o test test.o lib.a
clean:
rm *.o *.a test
.INTERMEDIATE: $(OBJ)
Proceed like this :
$ gmake
gcc -Wall -c -o test.o test.c
gcc -Wall -c -o lib.o lib.c
ar rv lib.a lib.o
a - lib.o
gcc -Wall -o test test.o lib.a
rm lib.o
$ ./test
Hello World
$ touch string.inc
$ gmake # <-- Should recompile lib.o, generate
gmake: Nothing to be done for `all'. # lib.a, then compile test
Description of the problem :
----------------------------
It seems that the problem is linked with the Archive members facility.
For some reasons, make does not stat the string.inc file.
$ touch string.inc
$ strace gmake
...
stat("RCS", 0xbfffd8cc) = -1 ENOENT (No such file or directory)
stat("SCCS", 0xbfffd8cc) = -1 ENOENT (No such file or directory)
stat("Makefile", {st_mode=S_IFREG|0644, st_size=143, ...}) = 0
time(NULL) = 955037789
stat("all", 0xbfffd834) = -1 ENOENT (No such file or directory)
stat("test", {st_mode=S_IFREG|0755, st_size=11871, ...}) = 0
stat("test.o", {st_mode=S_IFREG|0644, st_size=828, ...}) = 0
stat("test.c", {st_mode=S_IFREG|0644, st_size=64, ...}) = 0
stat("lib.a", {st_mode=S_IFREG|0644, st_size=1180, ...}) = 0
stat("lib.a", {st_mode=S_IFREG|0644, st_size=1180, ...}) = 0
open("lib.a", O_RDONLY|O_LARGEFILE) = 3
read(3, "!<arch>\n", 8) = 8
_llseek(3, 8, [8], SEEK_SET) = 0
read(3, "/ 955037436 0 "..., 60) = 60
_llseek(3, 100, [100], SEEK_SET) = 0
read(3, "lib.o/ 955037436 3194"..., 60) = 60
close(3) = 0
open("s.lib.a", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("s.", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat("lib.o", 0xbfffd71c) = -1 ENOENT (No such file or directory)
stat("lib.c", {st_mode=S_IFREG|0644, st_size=111, ...}) = 0
fstat(1, {st_mode=S_IFREG|0644, st_size=4852, ...}) = 0
mmap(0, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40013000
write(1, "gmake: Nothing to be done for `a"..., 37gmake: Nothing to be done for `all'.
) = 37
...
----
I take benefit of this mail to thank you for the incredible software you
provide to the computing community.
Thanks again,
Best regards,
Jerome Fournier.
--
-------------------------------------------------------
Jerome Fournier E-mail: [EMAIL PROTECTED]
IT Division Phone: +41 22 767 47 63
CERN,CH-1211 GENEVA 23 Fax: +41 22 767 66 50
gmake.tar.gz