%% "TAZ Vukovic, Mirko" <[EMAIL PROTECTED]> writes:

  tvm> I am having trouble with the following command in GNUmake 3.79.1,
  tvm> where I am trying to capture the bounding box info in a file:

  tvm> $(GS) -dNOPAUSE  -sDEVICE=bbox -dBATCH $(<) >& $(@) 

  tvm> It produces the error 

  tvm> Syntax error: Bad fd number 

The operator ">&" is a C shell operator (and some Bourne-alike shells,
like bash, also implement it).

All versions of make, including GNU make, invoke their commands using
the Bourne shell /bin/sh, not csh, so this operator is invalid in make
commands, thus your error.

The right way to redirect both stdout and stderr in sh is:

  > $@ 2>&1

(specifically, redirect stdout to $@, then dup stderr to go to the same
place as stdout).

HTH.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          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


_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to