Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!utah-cs!utah-gr!uplherc!nrc-ut!nrcvax!chris From: chris@nrcvax.UUCP (Chris Grevstad) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Strange makefile construct Message-ID: <1162@nrcvax.UUCP> Date: Wed, 2-Sep-87 02:21:12 EDT Article-I.D.: nrcvax.1162 Posted: Wed Sep 2 02:21:12 1987 Date-Received: Sat, 5-Sep-87 14:00:40 EDT Reply-To: chris@nrcvax.UUCP (Chris Grevstad) Organization: Frobozo Items Co. Inc. Ltd. Lines: 37 Xref: mnetor comp.unix.questions:3869 comp.unix.wizards:4069 I was looking at some source that came across the net some time ago and ran across a very strange construct in the makefile. It appears that this makefile is targeted for a SYSV system and I am familiar only with 4.2BSD make. This is the weirdness: target: file1.o file2.o file3.o file4.o $(CC) $(CFLAGS) $(?:.o=.c) Any suggestions? I'm hacking on the 4.3BSD make and wouldn't mind putting this in, if it does what I think it does. My interpretation says: This: $(CC) $(CFLAGS) $(?:.o=.c) becomes this: $(CC) $(CFLAGS) file1.c file2.c file3.c file4.c If my interpretation is correct, then exactly what does $(?:.o=.c) mean? Does the colon signify merely a modifier for the $? macro? Or is it some perversion of the standard colon dependency? And is the equals sign a special instance of the regular macro definition construct? Or does it just specify a transform of all elements in $? that terminate in .o? As an aside, can someone enumerate some of the differences between the 4.3BSD make and the Fourth Generation Make (or whatever they call it) from AT&T? Any informed answers are gratefully anticipated. -- Chris Grevstad hplabs!sdcrdcf!psivax!nrcvax!chris ihnp4!nrcvax!chris Refund? REFUND!? ..... REFUND!?!?!