Original Post
Hi. Here's a stripped-down version of the makefile I'm creating:
MYLIST = demo1 demo2
CXX = g++
CXXFLAGS = -pipe
LFLAGS =
.SUFFIXES: .build
.cpp.build: $<
$(CXX) $(CXXFLAGS) $(LFLAGS) -o "$*.build" "$<"
mylist: $(MYLIST:=.build)
The rule for mylist should expand to "mylist: demo1.build demo2.build" and trigger the .cpp.build rule. When I run this file I get
make: *** No rule to make target `demo1.build', needed by `mylist'. Stop.
Which I don't understand at all. Funny thing is I had a very similar system in another makefile a while ago and that worked then. I made a couple of minor, seemingly irrelevant changes, and now the old makefile is broken too. What am I doing wrong?