Unix Programming - nmake pseudotargets in make

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > November 2006 > nmake pseudotargets in make





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author nmake pseudotargets in make
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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com