[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to do arithmetic evaluation
From: |
Paul D. Smith |
Subject: |
Re: How to do arithmetic evaluation |
Date: |
Mon, 25 Sep 2000 00:44:42 -0400 |
%% address@hidden writes:
mc> Thanks for the help offered by Mr Paul D. Smith . I have tried
mc> both "$(())" and "$$(())",but neither works.For example,the
mc> statement "echo $$((3+1))" will result in " +1c".I don't know if I
mc> should download gnumake again.
You should provide a complete example.
However, remember that make (all makes, including GNU make) invoke
/bin/sh to execute commands. It's quite likely that /bin/sh is a
standard Bourne shell and doesn't provide complex operations like
builtin arithmetic evaluation.
Either use expr (echo `expr 3 + 1`) or set the SHELL make variable to
/bin/ksh or similar.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist