bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #30614] Output redirection with &> not parsed correctly in make 3.8


From: Joey Adams
Subject: [bug #30614] Output redirection with &> not parsed correctly in make 3.81 and up
Date: Sun, 01 Aug 2010 04:46:58 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.6 (KHTML, like Gecko) Chrome/5.0.386.0 Safari/533.6

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]