help-make
[Top][All Lists]
Advanced

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

Re: How to use wildcard for different 'stem' values


From: Paul D. Smith
Subject: Re: How to use wildcard for different 'stem' values
Date: Wed, 10 Sep 2003 08:08:07 -0400

%% address@hidden writes:

  hpvl> Thanks Paul for your suggestions. 

  hpvl> It seems to me the "old" solution is the savest to choose right
  hpvl> now.  Could you give me a small hint of how such a "generating
  hpvl> make fragment" rule should look like?

It would look something like this:

  include generated.mk

  generated.mk:  Makefile
        rm -f $@
        for t in $(TARGETLIST); do \
          echo "$$t : \$$(wildcard $$t/cmd/*.tcl)" >> $@; \
        done

  %process/gen.out : 
        ...

In this case TARGETLIST would contain a list of prefixes that matched
the "%" in the pattern rule.  If your list has a different format you
can massage it in the generated.mk rule.


Note I didn't run the above, but hopefully you get the idea.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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