[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $(shell case ...) -- problem with embedded parens
From: |
Paul D. Smith |
Subject: |
Re: $(shell case ...) -- problem with embedded parens |
Date: |
Mon, 22 Sep 2003 10:08:11 -0400 |
%% Noel Yap <address@hidden> writes:
ny> Hmmm, what's the difference? Or, which info file describes the
ny> differences?
There is no difference, except that when you use ${} make matches on
closing braces whereas when you use $() make matches on closing
parenthesis.
Since the Bourne shell case statement contains unmatched right
parenthesis, it doesn't work so well to use the $() format:
$(shell case foo in foo) echo match ;; esac)
^ ^
matches the opening paren
But:
${shell case foo in foo) echo match ;; esac}
^
doesn't match the opening brace.
This is described in the GNU make manual section "Basics of Variable
References".
--
-------------------------------------------------------------------------------
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