Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!mcvax!eurifb!euraiv1!evas From: evas@euraiv1.UUCP (Eelco van Asperen) Newsgroups: comp.unix.questions Subject: Re: Using subdirectories from make Message-ID: <595@euraiv1.UUCP> Date: Tue, 29-Sep-87 12:38:58 EDT Article-I.D.: euraiv1.595 Posted: Tue Sep 29 12:38:58 1987 Date-Received: Sat, 3-Oct-87 08:27:29 EDT References: <831@ektools.UUCP> <204@tut.cis.ohio-state.edu> <1413@ihlpm.ATT.COM> Organization: Erasmus University EF/AIV,Rotterdam,Netherlands Lines: 30 Summary: inference rules that know about subdirectories In article <1413@ihlpm.ATT.COM>, snafu@ihlpm.ATT.COM (Wallis) writes: > > $(OBJ_DIR)/foo.o: $(SRC_DIR)/foo.c $(INC_DIR)/hdr.h > $(CC) $(CFLAGS) $(SRC_DIR)/bar.c > > $(OBJ_DIR)/bar.o: $(SRC_DIR)/bar.c $(INC_DIR)/hdr.h > $(CC) $(CFLAGS) $(SPEC_DEFS) $(SRC_DIR)/bar.c This works but what I'ld really want are inference rules that "know" about sub-directories; fe. .c.o: cc $(CFLAGS) $< -o $(OBJ_DIR) $(OBJ_DIR)/foo.o: $(SRC_DIR)/foo.c $(INC_DIR)/hdr.h This apparently failes with the current make because a pathname ending in .o (fe. obj/foo.o) will not match the '.c.o' template that is defined for the inference rule so make will complain "don't know how to make foo.o". Unless someone can come up with a (valid) reason for this behaviour, I consider this a bug in make. Eelco van Asperen. -----------------------------------------+------------------------------ Erasmus University Rotterdam |uucp:mcvax!eurifb!euraiv1!evas Fac. of Economics, Computer Science Dept.|earn:asperen@hroeur5 PO.box 1738 / 3000 DR Rotterdam | T H E N E T H E R L A N D S |Yet Another Silly Signature. -----------------------------------------+------------------------------