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

_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to