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: PATTON, BILLY \(SBCSI\)
Subject: RE: How to "implicit rules" Should be simple
Date: Tue, 2 May 2006 09:42:58 -0500


> -----Original Message-----
> From: Paul Smith [mailto:address@hidden On Behalf Of Paul D. Smith
> Sent: Tuesday, May 02, 2006 9:40 AM
> To: PATTON, BILLY (SBCSI)
> Cc: address@hidden
> Subject: Re: How to "implicit rules" Should be simple
> 
> 
> %% "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 $<"

So how can I get this to work?


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