| Bill Medland 2006-11-24, 1:22 pm |
| What techniques are available for doing pseudotargets (as in Microsoft's
NMAKE; I don't know if that differs from other nmakes) in make?
The functionality that I am after is that the pseudotarget is as up-to-date
as the lates of all its dependents (which may themselves be pseudotargets).
The only way of handling it that I can think of is to use macros instead of
targets.
e.g. equivalent to
all: MyFirst
MyFirst: MySecond MyThird
MySecond: a.exe b.exe
MyThird: c.exe d.exe
a.exe: a.c
b.exe: b.c
c.exe c.c
d.exe d.c
Clearly PHONY is no use (assuming gnu make) since it ALWAYS is out of date
The only obvious solution I can think of is
MySecond = a.exe b.exe
MyThird = c.exe d.exe
MyFirst = $(MySecond) $(MyThird)
all: $(MyFirst)
a.exe: a.c
etc.
Is there a standard technique of which I am not aware?
--
Bill Medland
|