help-make
[Top][All Lists]
Advanced

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

Re: How to "implicit rules" Should be simple


From: Paul D. Smith
Subject: Re: How to "implicit rules" Should be simple
Date: Tue, 2 May 2006 10:40:22 -0400

%% "PATTON, BILLY \(SBCSI\)" <address@hidden> writes:

  pb> Here is what I'm trying to do.

  pb> /full_path/bin/stop_md_immed_sh : /full_path/src/stop_md_immed_sh.ksh

  pb> % : %.ksh
  pb>         @echo "Copy $@ to $<"

This can't work because the stems don't match: the target stem is
"/full_path/bin/stop_md_immed_sh", and so it tries to use a prerequisite
of "/full_path/bin/stop_md_immed_sh.ksh", which doesn't exist.


You can't use pattern rules unless the stems of the pattern match
EXACTLY, using a string match.

  pb> I have @ 250 extensions I deal with.  I would rather have an
  pb> implicit rule rather than to determine what the extension is an
  pb> add it to a rule being created.

I don't quite understand what that means, but you'll have to write
something like this:

    /full_path/bin/% : /full_path/src/%.ksh
            ...

If you can't do that you won't be able to use pattern rules.

-- 
-------------------------------------------------------------------------------
 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]