bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug in Make 3.79 ??


From: Marcel Loose
Subject: Bug in Make 3.79 ??
Date: Thu, 7 Dec 2000 14:20:26 +0100

Hi all,

Recently, we upgraded from Make version 3.76.1 to version 3.79.1, and now
I'm having a problem doing a "make depend" with my Makefile. The problem is
that Make 3.79.1 loops indefinitely.
Due to the recursive nature of my Makefile (it includes the .depend file it
recreates) make should not consider .depend when in re-reads the Makefile.
Make 3.76.1 does this properly by out-dating the .depend file and the
Makefile itself when it re-executes. However, Make 3.79.1 doesn't out-date
the .depend file. This can be seen by using "make -d" and doing a grep on
"Re-executing:"

Is this a bug in Make 3.79.1??
Please send replies to address@hidden Thanx in advance.

Below is a sized down version of the Makefile I use (beware that the <TAB>
characters may have gotten mangled)

>>>>>>>>>>>>>>>>>>>>>>>>>>>>
EXES = main

.PHONY : default all depend
default : $(firstword $(EXES))
all : $(EXES)
depend :

DEPEND = .depend
PRGS = $(addsuffix .cc, $(EXES))
SRCS = $(filter-out $(PRGS), $(wildcard *.cc))

CXX = g++
CXXFLAGS= -g -Wall
LIB = libmylib.a

$(EXES): $(LIB)

$(LIB): $(SRCS:%.cc=$(LIB)(%.o))

$(DEPEND): depend
 @echo "Updating dependencies ..."
 @$(CXX) -MM $(CXXFLAGS) $(SRCS) | sed 's|\w*\.o|$(LIB)(&)|' > $(DEPEND)
 @$(CXX) -MM $(CXXFLAGS) $(PRGS) >> $(DEPEND)

-include $(DEPEND)
<<<<<<<<<<<<<<<<<<<<<<<<<<<<







reply via email to

[Prev in Thread] Current Thread [Next in Thread]