mk from AT&T

Benson Margulies benson at ksr.UUCP
Tue Feb 28 01:13:15 AEST 1989


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 at ksr.com



More information about the Comp.unix.questions mailing list