help-make
[Top][All Lists]
Advanced

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

is there a simple way to always get a single $ when passed to shell


From: Mark Galeck (CW)
Subject: is there a simple way to always get a single $ when passed to shell
Date: Wed, 5 Oct 2011 18:46:29 -0700

Hello,  

I am trying to write a single macro that can be put in a recipe, that either if 
that recipe is called within or without $(eval), it will yield a single $ when 
the shell gets it.

Let me show you what I mean:

define MACRO
echo $$$$
endef

define MACRO1
foobar1:
        $(MACRO)
endef

foobar:
        $(MACRO)

$(eval $(MACRO1))



When you do
>make foobar1
you get "$" which is what I want.  But it does not work with
>make foobar
there you have "$$".  

How to write a single MACRO, which can be always called, regardless with or 
without $(eval) so that the shell always gets $

Mark



reply via email to

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