help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: functions allowed in prerequisite list?


From: gk
Subject: Re: functions allowed in prerequisite list?
Date: Tue, 05 Nov 2002 10:44:08 -0800

At 12:06 AM 11/5/2002 -0500, Paul D. Smith wrote:
If you have a variable containing all the different kinds of source, why
not just declare it explicitly:

  XMS_SOURCES = foo.xms bar.xms baz.xms biz.xms

  $(XMS_SOURCES:%=%.mk): xms.mkdepend

I think I have found a simpler way that avoids the processing overhead in the above substitution.
I simply have a separate pattern rule for each source file type:

%.xms.mk : %.xms /path/to/xms.mkdepend
        /path/to/xms.mkdepend $< > $@
%.xmt.mk : %.xmt /path/to/xmt.mkdepend
        /path/to/xmt.mkdepend $< > $@
etc.

  g> Here is an explicit rule for what I want:
  g> foo.xms.mk : foo.xms /path/to/scripts/xms.mkdepend

  g> Is there a way to generalize the above rule for all %.mk files?

No.

Thanks very much for your help.
- Greg Keraunen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]