URL: <http://savannah.gnu.org/bugs/?30614>
Summary: Output redirection with &> not parsed correctly in make 3.81 and up Project: make Submitted by: joeyalanadams Submitted on: Sun 01 Aug 2010 04:46:57 AM GMT Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Component Version: CVS Operating System: POSIX-Based Fixed Release: None Triage Status: None _______________________________________________________ Details: Given the following Makefile: all: @echo "You shouldn't be seeing this." &> /dev/null GNU Make 3.80 has the expected behavior, which is to redirect stdout/stderr to /dev/null . 3.81, 3.82, and CVS do not redirect either stdout or stderr. Instead, the echo command is backgrounded, and the output appears in the terminal. If I replace &> with >& (which also works in GNU Make 3.80): all: @echo "You shouldn't be seeing this." >& /dev/null I get the following error message: /bin/sh: Syntax error: Bad fd number make: *** [all] Error 2 Here is a workaround for redirecting stdout/stderr that does work in GNU Make 3.81 and up: all: @(echo "You shouldn't be seeing this." 2>&1) > /dev/null _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?30614> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make