Hello,

One year after, here's the test Makefile.

And here are the results, even worse than they were before.

First, let's run ye olde goode make 3.81:

$ make --version
GNU Make 3.81
Copyright (C) 2006  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.

This program built for i486-pc-linux-gnu
$ rm *.o *.a
$ make
touch a.o
ar rv test.a a.o
ar: creating test.a
a - a.o
touch b.o
ar rv test.a b.o
a - b.o
touch c.o
ar rv test.a c.o
a - c.o
$ cat test.a
!<arch>
a.o/            1375039924  1000  1000  100644  0         `
b.o/            1375039924  1000  1000  100644  0         `
c.o/            1375039924  1000  1000  100644  0         `

So far so good, it works as intended. Now let's try make 3.82:

$ rm *.o *.a
$ ./make --version
GNU Make 3.82
Built for i486-pc-linux-gnu
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ ./make 

... and nothing happens for a long time. Then I run this on a different 
terminal:

$ ps aux | grep make | head -n1
andrew    3621  103  0.0   3996   848 pts/12   R+   21:33   0:09 ./make

Wow, it's consuming 103% (!) of the CPU time! :) Cool. Let's run it with -d:

$ ./make -d
GNU Make 3.82
Built for i486-pc-linux-gnu
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile `Makefile'...
Updating makefiles....
 Considering target file `Makefile'.
  Looking for an implicit rule for `Makefile'.
  Trying pattern rule with stem `Makefile'.
  Trying implicit prerequisite `Makefile.o'.
  [snip]
 No implicit rule found for `all'.
  Considering target file `a.o)'.
   File `a.o)' does not exist.
   Looking for an implicit rule for `a.o)'.
   Trying pattern rule with stem `a.o)'.
   Trying implicit prerequisite `a.o).o'.
   Trying pattern rule with stem `a.o)'.
   Trying implicit prerequisite `a.o).c'.
   [snip]
   Trying pattern rule with stem `a.o)'.
   Trying implicit prerequisite `SCCS/s.a.o)'.
   Trying pattern rule with stem `a.o)'.
   Trying implicit prerequisite `a.o).o'.
   Looking for a rule with intermediate file `a.o).o'.
    Avoiding implicit rule recursion.
    Trying pattern rule with stem `a.o)'.
    Trying implicit prerequisite `a.o).c'.
    [snip]
    Trying implicit prerequisite `SCCS/s.a.o).o'.
    Trying pattern rule with stem `a.o)'.
    Trying implicit prerequisite `a.o).c'.
    Looking for a rule with intermediate file `a.o).c'.
     Avoiding implicit rule recursion.
     Avoiding implicit rule recursion.
     Trying pattern rule with stem `a.o)'.
     Trying implicit prerequisite `a.o).y'.
     Trying pattern rule with stem `a.o)'.
     Trying implicit prerequisite `a.o).l'.
     [snip]
    Trying implicit prerequisite `RCS/a.o).sh'.
    Trying pattern rule with stem `a.o).sh'.
    Trying implicit prerequisite `s.a.o).sh'.
    Trying pattern rule with stem `a.o).sh'.
    Trying implicit prerequisite `SCCS/s.a.o).sh'.
   No implicit rule found for `a.o)'.
   Finished prerequisites of target file `a.o)'.
  Must remake target `a.o)'.
make: *** No rule to make target `a.o)', needed by `all'.  Stop.

Fun, innit?

-- 
WBR, Andrew

Attachment: Makefile
Description: Binary data

Attachment: signature.asc
Description: PGP signature

Reply via email to