When I try to use
the archive member syntax gnu make always decides
the prerequisite
object is newer than the archive member and re-archives it.
I would expect make
to determine that the archived object is uptodate
and not rearchive
it.
Tools:
GNU make v3.7.9
Sparc running Solaris 7 (SunOS 5.7)
GNU ar 2.9.1
The simplest example
is to create a new directory and copy an object
module into
it. No makefile is needed. Running
% make
"foo.a(j.o)"
once creates the
archive foo.a and adds j.o to it. Running it again
reinstalls j.o in
the archive.
760:test/% make
--debug=b "foo.a(j.o)"
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.7
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.
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.7
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]>.
Reading
makefiles...
Updating goal targets....
Prerequisite `j.o' is newer than target `foo.a(j.o)'.
Must remake target `foo.a(j.o)'.
/users1/bhill/tmp/binutils-2.9.1/binutils/ar rv foo.a j.o
r - j.o
Successfully remade target file `foo.a(j.o)'.
Updating goal targets....
Prerequisite `j.o' is newer than target `foo.a(j.o)'.
Must remake target `foo.a(j.o)'.
/users1/bhill/tmp/binutils-2.9.1/binutils/ar rv foo.a j.o
r - j.o
Successfully remade target file `foo.a(j.o)'.
761:test/%
!!
make --debug=b "foo.a(j.o)"
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.7
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.
make --debug=b "foo.a(j.o)"
GNU Make version 3.79, by Richard Stallman and Roland McGrath.
Built for sparc-sun-solaris2.7
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]>.
Reading
makefiles...
Updating goal targets....
Prerequisite `j.o' is newer than target `foo.a(j.o)'.
Must remake target `foo.a(j.o)'.
/users1/bhill/tmp/binutils-2.9.1/binutils/ar rv foo.a j.o
r - j.o
Successfully remade target file `foo.a(j.o)'.
Updating goal targets....
Prerequisite `j.o' is newer than target `foo.a(j.o)'.
Must remake target `foo.a(j.o)'.
/users1/bhill/tmp/binutils-2.9.1/binutils/ar rv foo.a j.o
r - j.o
Successfully remade target file `foo.a(j.o)'.
