<div dir="ltr"><div><div>I&#39;m trying to write some MESSAGE() wrappers like info(), warning(), fatal(), etc which may be a bit easier to use. But I failed to simulate the correct MESSAGE() behavior no matter I use MACRO or FUNCTION. For example:<br>


<br>  MACRO(info_mac_1)<br>      message(&quot;[MACRO 1] &quot; ${ARGV})<br>  ENDMACRO()<br>  MACRO(info_mac_2)<br>      message(&quot;[MACRO 2] &quot; &quot;${ARGV}&quot;)<br>  ENDMACRO()<br>  FUNCTION(info_fun_1)<br>      message(&quot;[FUNC 1] &quot; ${ARGV})<br>


  ENDFUNCTION()<br>  FUNCTION(info_fun_2)<br>      message(&quot;[FUNC 2] &quot; &quot;${ARGV}&quot;)<br>  ENDFUNCTION()<br><br>  message(&quot;foo;bar&quot;)<br>  info_mac_1(&quot;foo;bar&quot;)<br><br>  message(foo bar)<br>


  info_mac_2(foo bar)<br><br>  message(&quot;foo;bar&quot;)<br>  info_fun_1(&quot;foo;bar&quot;)<br><br>  message(foo bar)<br>  info_fun_2(foo bar)<br><br></div><div>The output (tested with 2.8.8) would be like this:<br>

<br>  foo;bar<br>  [MACRO 1] foobar<br>
  foobar<br>  [MACRO 2] foo;bar<br>  foo;bar<br>  [FUNC 1] foobar<br>  foobar<br>  [FUNC 2] foo;bar<br></div><div><br></div>As you can see all the 4 commands I defined did not work the same way as MESSAGE(). So how should I define a correct wrapper on MESSAGE()?<br>


<br></div><div>Thanks.<br></div><div><br></div>-Clark<br></div>