Why does this makefile work with make 3.81 but not 3.82?

I have a very simple makefile for creating a static library that worked for a long time with GNU make version 3.81, but not version 3.82.

I read about backward compatibility issues, and these issues don't seem to apply. I also checked a few posts here, for example Makefile Syntax: Static library lib $ (library) .a ($ objects) and Makefile - to create a static library , but cannot find a solution.

Here is my makefile:

FILES = file1.cc file2.cc file3.cc

OBJ_FILES = $(FILES:.cc=.o)

libname.a: libname.a($(OBJ_FILES))

In version 3.81, this compiles using built-in and implicit rules. Output example

g++  -c -o file1.o file1.cc
ar rv libname.a file1.o
ar: creating libname.a
a - file1.o

but with version 3.82 it fails with

*** No rule to make target `file1.o)'

I looked at the output of make -d and version 3.82 with

   No implicit rule found for `file1.o)'.
   Finished prerequisites of target file `file1.o)'.
  Must remake target `file1.o)'.
make: *** No rule to make target `file1.o)', needed by `libname'.  Stop.

while version 3.81 continues without delay

Trying implicit prerequisite `file1.o'.
Looking for a rule with intermediate file `file1.o'.
 <snip>
Found an implicit rule for `libname.a(file1.o)'.

What gives? Please help! Thanks!

+4
1

file1.o)': , - ')' filename/string.

OBJ_FILES = file1.o file2. file3.o .cc .o.

0

All Articles