[gnu.utils.bug] make 3.54 archive member strangeness on Tower32/600

k34415h@taltta.hut.FI (PikkuOrava Wessman) (07/25/89)

GNU make 3.54 is behaving strangely on our NCR Tower32/600 with
operating sys release 02.01 (System V.2). The problem has to do with
archive members, GNU make thinks they are always out of date and
remakes them every time. This could just be a behaviour difference
between GNU make an the standard one -- if that's so then would
someone please tell me how I should maintain libraries with GNU make!

The following script illustrates the problem:

% ls -C
Makefile  ajat.c    date.c    misc.c

% cat Makefile
CC=cc
CFLAGS=-O -I../../hdrs_10
LIB=testlib.a

LOBJ= $(LIB)(ajat.o) $(LIB)(date.o) $(LIB)(misc.o)

$(LIB): $(LOBJ)

$(LIB)(ajat.o): ajat.c
$(LIB)(date.o): date.c
$(LIB)(misc.o): misc.c

% make  # This is the system 'make'
	cc -c -O -I../../hdrs_10 ajat.c
	ar rv testlib.a ajat.o
ar: creating testlib.a
a - ajat.o
	rm -f ajat.o
	cc -c -O -I../../hdrs_10 date.c
	ar rv testlib.a date.o
a - date.o
	rm -f date.o
	cc -c -O -I../../hdrs_10 misc.c
	ar rv testlib.a misc.o
a - misc.o
	rm -f misc.o

% make
`testlib.a' is up to date.

% rm test* *.o

% gmake    # GNU Make 3.54
cc -O -I../../hdrs_10   -c ajat.c -o ajat.o
ar rv testlib.a ajat.o
ar: creating testlib.a
a - ajat.o
cc -O -I../../hdrs_10   -c date.c -o date.o
ar rv testlib.a date.o
a - date.o
cc -O -I../../hdrs_10   -c misc.c -o misc.o
ar rv testlib.a misc.o
a - misc.o
rm  ajat.o date.o misc.o

Now the fun begins... we try gmake again.

% gmake
cc -O -I../../hdrs_10   -c ajat.c -o ajat.o
ar rv testlib.a ajat.o
r - ajat.o
cc -O -I../../hdrs_10   -c date.c -o date.o
ar rv testlib.a date.o
r - date.o
cc -O -I../../hdrs_10   -c misc.c -o misc.o
ar rv testlib.a misc.o
r - misc.o
rm  ajat.o date.o misc.o

... and repeats this every time.

% ls -C
Makefile   ajat.c     date.c     misc.c     testlib.a

% make    # Normal 'make'
`testlib.a' is up to date.

In the following sequence, GNU make doesn't seem to be
able to locate the archive members...

% gmake -t
touch ajat.o
touch testlib.a(ajat.o)
gmake: touch: Member `ajat.o' does not exist in `testlib.a'
touch date.o
touch testlib.a(date.o)
gmake: touch: Member `date.o' does not exist in `testlib.a'
touch misc.o
touch testlib.a(misc.o)
gmake: touch: Member `misc.o' does not exist in `testlib.a'
rm  ajat.o date.o misc.o

% gmake -d
GNU Make version 3.54, by Richard Stallman and Roland McGrath.
Copyright (C) 1988, 1989 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.

Reading makefiles...
Updating makefiles....
 Considering target file `Makefile'.
  Looking for an implicit rule for `Makefile'.
  Trying pattern rule with stem `Makefile'.
   .
   .  etc...
   .
   Trying pattern rule with stem `Makefile.sh'.
   Trying implicit dependency `SCCS/s.Makefile.sh'.
  No implicit rule found for `Makefile'.
  Finished dependencies of target file `Makefile'.
 No need to remake target file `Makefile'.
Updating goal targets....
Considering target file `testlib.a'.
 Looking for an implicit rule for `testlib.a'.
 Trying pattern rule with stem `testlib.a'.
 Trying implicit dependency `testlib.a,v'.
 Trying pattern rule with stem `testlib.a'.
 Trying implicit dependency `RCS/testlib.a,v'.
 Trying pattern rule with stem `testlib.a'.
 Trying implicit dependency `s.testlib.a'.
 Trying pattern rule with stem `testlib.a'.
 Trying implicit dependency `SCCS/s.testlib.a'.
 No implicit rule found for `testlib.a'.
  Considering target file `testlib.a(ajat.o)'.
   File `testlib.a(ajat.o)' does not exist.
   Looking for an implicit rule for `testlib.a(ajat.o)'.
   Looking for archive-member implicit rule for `testlib.a(ajat.o)'.
   Trying pattern rule with stem `ajat.o'.
   Trying implicit dependency `ajat.o'.
   Trying pattern rule with stem `(ajat.o)'.
   Trying implicit dependency `(ajat.o),v'.
   Trying pattern rule with stem `(ajat.o)'.
   Trying implicit dependency `RCS/(ajat.o),v'.
   Trying pattern rule with stem `(ajat.o)'.
   Trying implicit dependency `s.(ajat.o)'.
   Trying pattern rule with stem `(ajat.o)'.
   Trying implicit dependency `SCCS/s.(ajat.o)'.
   Trying pattern rule with stem `ajat.o'.
   Trying implicit dependency `ajat.o'.
   Looking for a rule with intermediate file `ajat.o'.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem `ajat.o'.
    Trying implicit dependency `ajat.o,v'.
    Trying pattern rule with stem `ajat.o'.
    Trying implicit dependency `RCS/ajat.o,v'.
    Trying pattern rule with stem `ajat.o'.
    Trying implicit dependency `s.ajat.o'.
    Trying pattern rule with stem `ajat.o'.
    Trying implicit dependency `SCCS/s.ajat.o'.
    Trying pattern rule with stem `ajat'.
    Trying implicit dependency `ajat.c'.
   Found implicit an rule for `testlib.a(ajat.o)'.
     Considering target file `ajat.c'.
      Looking for an implicit rule for `ajat.c'.
      Trying pattern rule with stem `ajat.c'.
      Trying implicit dependency `ajat.c,v'.
      Trying pattern rule with stem `ajat.c'.
      Trying implicit dependency `RCS/ajat.c,v'.
      Trying pattern rule with stem `ajat.c'.
      Trying implicit dependency `s.ajat.c'.
      Trying pattern rule with stem `ajat.c'.
      Trying implicit dependency `SCCS/s.ajat.c'.
      Trying pattern rule with stem `ajat'.
      Trying implicit dependency `ajat.y'.
      Trying pattern rule with stem `ajat'.
      Trying implicit dependency `ajat.l'.
      Trying pattern rule with stem `ajat'.
      Trying implicit dependency `ajat.cweb'.
      Trying pattern rule with stem `ajat'.
      Trying implicit dependency `ajat.y'.
      Looking for a rule with intermediate file `ajat.y'.
       Avoiding implicit rule recursion.
       Trying pattern rule with stem `ajat.y'.
       Trying implicit dependency `ajat.y,v'.
       Trying pattern rule with stem `ajat.y'.
       Trying implicit dependency `RCS/ajat.y,v'.
       Trying pattern rule with stem `ajat.y'.
       Trying implicit dependency `s.ajat.y'.
       Trying pattern rule with stem `ajat.y'.
       Trying implicit dependency `SCCS/s.ajat.y'.
      Trying pattern rule with stem `ajat'.
      Trying implicit dependency `ajat.l'.
      Looking for a rule with intermediate file `ajat.l'.
       Avoiding implicit rule recursion.
       Trying pattern rule with stem `ajat.l'.
       Trying implicit dependency `ajat.l,v'.
       Trying pattern rule with stem `ajat.l'.
       Trying implicit dependency `RCS/ajat.l,v'.
       Trying pattern rule with stem `ajat.l'.
       Trying implicit dependency `s.ajat.l'.
       Trying pattern rule with stem `ajat.l'.
       Trying implicit dependency `SCCS/s.ajat.l'.
      Trying pattern rule with stem `ajat'.
      Trying implicit dependency `ajat.cweb'.
      Looking for a rule with intermediate file `ajat.cweb'.
       Avoiding implicit rule recursion.
       Trying pattern rule with stem `ajat.cweb'.
       Trying implicit dependency `ajat.cweb,v'.
       Trying pattern rule with stem `ajat.cweb'.
       Trying implicit dependency `RCS/ajat.cweb,v'.
       Trying pattern rule with stem `ajat.cweb'.
       Trying implicit dependency `s.ajat.cweb'.
       Trying pattern rule with stem `ajat.cweb'.
       Trying implicit dependency `SCCS/s.ajat.cweb'.
      No implicit rule found for `ajat.c'.
      Finished dependencies of target file `ajat.c'.
     No need to remake target file `ajat.c'.
    Considering target file `ajat.c'.
    File `ajat.c' was considered already.
   Considering target file `ajat.o'.
    File `ajat.o' does not exist.
     Considering target file `ajat.c'.
     File `ajat.c' was considered already.
    Finished dependencies of target file `ajat.o'.
   Must remake target file `ajat.o'.
cc -O -I../../hdrs_10   -c ajat.c -o ajat.o
   Successfully remade target file `ajat.o'.
   Finished dependencies of target file `testlib.a(ajat.o)'.
  Must remake target file `testlib.a(ajat.o)'.
ar rv testlib.a ajat.o
r - ajat.o
  Successfully remade target file `testlib.a(ajat.o)'.
  Considering target file `testlib.a(date.o)'.
   File `testlib.a(date.o)' does not exist.
   Looking for an implicit rule for `testlib.a(date.o)'.
   .
   . etc...
   .
  Successfully remade target file `testlib.a(misc.o)'.
 Finished dependencies of target file `testlib.a'.
 Dependency `testlib.a(ajat.o)' is older than dependent `testlib.a'.
 Dependency `testlib.a(date.o)' is older than dependent `testlib.a'.
 Dependency `testlib.a(misc.o)' is older than dependent `testlib.a'.
Must remake target file `testlib.a'.
Successfully remade target file `testlib.a'.
rm  ajat.o date.o misc.o

%

--
__________________________________________________________________________
Petri Wessman (PikkuOrava)      Helsinki University of Technology, Finland
- You don't exist. Go away. -       {k34415h@taltta,orava@otax.tky}.hut.FI