Author: hailfinger
Date: 2009-04-26 00:07:28 +0200 (Sun, 26 Apr 2009)
New Revision: 4211

Modified:
   trunk/util/flashrom/Makefile
Log:
The flashrom makefile wants to redirect both stdout and stderr to
/dev/null for one compile test.
The old variant of using &>/dev/null works on bash and zsh, but not on
dash and tcsh. dash and tcsh interpret it as "background command and
truncate /dev/null" which is not what we want. >& works on tcsh and
bash, but it is not POSIX compliant.
Since make uses /bin/sh and /bin/sh has to be POSIX compliant, we can
use the POSIX variant of stderr and stdout redirection.

>/dev/null 2>&1
is POSIX compliant. This is specified in SuSv3, Shell Command Language,
sections 2.7.2 and 2.7.6.

Signed-off-by: Stephan Guilloux <[email protected]>
Signed-off-by: Carl-Daniel Hailfinger <[email protected]>
Acked-by: Ward Vandewege <[email protected]>


Modified: trunk/util/flashrom/Makefile
===================================================================
--- trunk/util/flashrom/Makefile        2009-04-25 14:39:12 UTC (rev 4210)
+++ trunk/util/flashrom/Makefile        2009-04-25 22:07:28 UTC (rev 4211)
@@ -65,7 +65,7 @@
                   echo "struct pci_access *pacc;";        \
                   echo "int main(int argc, char **argv)"; \
                   echo "{ pacc = pci_alloc(); return 0; }"; ) > .test.c )
-       @$(CC) $(CFLAGS) .test.c -o .test $(LDFLAGS) &>/dev/null &&     \
+       @$(CC) $(CFLAGS) .test.c -o .test $(LDFLAGS) >/dev/null 2>&1 && \
                echo "found." || ( echo "not found."; echo;             \
                echo "Please install pciutils-devel and zlib-devel.";   \
                echo "See README for more information."; echo;          \


-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to