help-make
[Top][All Lists]
Advanced

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

Re: VPATH/vpath and Pattern Rules


From: Michael Ludwig
Subject: Re: VPATH/vpath and Pattern Rules
Date: Sat, 14 Jan 2012 17:47:39 +0100
User-agent: Mutt/1.5.20 (2009-12-10)

Paul Smith schrieb am 14.01.2012 um 11:30 (-0500):
> On Sat, 2012-01-14 at 16:20 +0100, Michael Ludwig wrote:

> >     …
> >     @echo ==   $$^| $|
> >     @echo ==   $$* $*
> > 
> > Can I define it as a function? To invoke it like: $(echoautovars)
> 
> Sure, but you really should quote these to protect them from the shell:
> 
>         define echoautovars
>         echo ==   '$$@ $@'
>         echo ==   '$$%% $%'
>         echo ==   '$$^< $<'
>         echo ==   '$$? $?'
>         echo ==   '$$^^ $^'
>         echo ==   '$$+ $+'
>         echo ==   '$$^| $|'
>         echo ==   '$$* $*'
>         endef

Works great. Well, I'm on cmd.exe (Windows), and despite all the rumours
about Microsoft being a greedy company, cmd.exe doesn't eat dollars.

Given the differences between the shells, I think you'd need some way to
detect the host shell or host system in order to #ifdef the right thing.

-- 
Michael Ludwig



reply via email to

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