Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!rutgers!orstcs!mist!osbornk From: osbornk@mist.cs.orst.edu (Kasey S. Osborn) Newsgroups: comp.unix.questions Subject: Makefile inference rule Keywords: make Message-ID: <18769@orstcs.CS.ORST.EDU> Date: 7 Jun 90 03:43:51 GMT Sender: usenet@orstcs.CS.ORST.EDU Reply-To: osbornk@cs.orst.edu (Kasey S. Osborn) Organization: Oregon State University, Corvallis Lines: 29 I am trying to establish an inference rule to build executables from objects. Here is a highlight of my makefile: OBJS = gc.o mem.o .c.o: cc -ansi -g -c -w0,-Wall $< # This works fine. .o: cc -g $(OBJS) $< -o $@ # This is ignored!!! box: $(OBJS) box.o box.o: box.c gc.h The key here is the .o: inference rule. It is completely ignored, yet documentation I read tells me this is how it is done. I get no diagnostic message, just a new prompt. Ironically, if I remove the line: box: $(OBJS) box.o and invoke "make box", the .o: inference rule takes effect. However, the additional dependencies (OBJS) are ignored. Does anyone have a clue? Kasey S. Osborn "There's a lot to be said for brevity."