Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!ksr!benson From: benson@ksr.UUCP (Benson Margulies) Newsgroups: comp.unix.questions Subject: mk from AT&T Message-ID: <518@ksr.UUCP> Date: 27 Feb 89 15:13:15 GMT Reply-To: benson@ksr.com (Benson Margulies) Distribution: na Organization: Kendall Square Research, Cambridge MA Lines: 30 Sender: This message is directed to the mk experts/authors on the net, if any. (mk is an alternative make tool available via the AT&T toolchest). It seems impossible to set up a regular expression metarule in mk that will permit dependencies of the form: foo.o : ../x/foo.c The regular expression (not to mention the % rules) insist that the source pathname be built entirely out of literals and pieces of the target. There is no provision for the source containing things that the target lacks. One could try to write: '\(.*\)\.o' :R: '.*\1.c' but that won't work, since the source is not regexp matched, it is only regexp expanded from the target. This is a fairly common thing to want to do. In nmake, the .SOURCE targets often obviate it by allowing searching for sources. Does anyone know a trick that I don't? Is there some theory at work here? -- Benson I. Margulies Kendall Square Research Corp. harvard!ksr!benson benson@ksr.com