On Tue, Apr 27, 2004, Karl Vogel wrote: > The checkin from http://cvs.openpkg.org/chngview?cn=16060 is wrong. > > # determine build flags > + l_ccisgcc=no > + if [ ".`(%{l_cc} -v; %{l_cc} --version) </dev/null 2>/dev/null | grep > 'gcc'`" != . ]; then > + l_ccisgcc=yes > + fi > > gcc outputs the version string to stderr and since stderr is redirected to > /dev/null, this test is never true. The following test should give the > expected result: > > (%{l_cc} -v; %{l_cc} --version) 2>&1 | grep >/dev/null 'gcc' && > l_ccisgcc=yes > > Another tiny issue: > > $ cc --version > cc (GCC) 3.4.0 (OpenPKG-CURRENT) > Copyright (C) 2004 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > $ gcc --version > gcc (GCC) 3.4.0 (OpenPKG-CURRENT) > Copyright (C) 2004 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > Using gcc as 'cc' will not have a 'gcc' string in the output. One can use > 'grep -i' for a case insensitive grep, but I'm not sure if that works on all > OpenPKG platforms.
Good catch. But "grep -i" is sufficiently portable within OpenPKG, so I've added this together with the "2>&1" redirection. See http://cvs.openpkg.org/chngview?cn=16187 for details. Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com ______________________________________________________________________ The OpenPKG Project www.openpkg.org Developer Communication List [EMAIL PROTECTED]
