Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ames!sdcsvax!ucbvax!hplabs!nsc!woolsey From: woolsey@nsc.nsc.com (Jeff Woolsey) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Strange makefile construct Message-ID: <4624@nsc.nsc.com> Date: Tue, 8-Sep-87 19:13:29 EDT Article-I.D.: nsc.4624 Posted: Tue Sep 8 19:13:29 1987 Date-Received: Thu, 10-Sep-87 01:51:29 EDT References: <1162@nrcvax.UUCP> Reply-To: woolsey@nsc.UUCP (Jeff Woolsey) Organization: National Semiconductor, Sunnyvale Lines: 28 Xref: mnetor comp.unix.questions:3952 comp.unix.wizards:4146 In article <1162@nrcvax.UUCP> chris@nrcvax.UUCP (Chris Grevstad) writes: >This is the weirdness: > >target: file1.o file2.o file3.o file4.o > $(CC) $(CFLAGS) $(?:.o=.c) > >My interpretation says: > This: > $(CC) $(CFLAGS) $(?:.o=.c) > becomes this: > $(CC) $(CFLAGS) file1.c file2.c file3.c file4.c > All I need now is something that turns FILES = one two three four into $(CC) $(CFLAGS) one.c two.c three.c four.c and a default rule to go along with it. I know about basename(1), but it doesn't do what I want. -- "Gloria has a visible organism." - B. Kliban. Jeff Woolsey National Semiconductor Corporation ...!nsc!woolsey -or- woolsey@nsc.COM -or- woolsey@umn-cs.ARPA