This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with make under cygwin


On Tue, Jun 01, 2004 at 10:00:21AM +0200, bertrand marquis wrote:
>Hello
>
>   i'm having a strange problem with the make command and shell.
>
>i try to run a makefile with this :
>HAVE_DEVFS := $(shell grep 'CONFIG_DEVFS_FS=y' ../../linux/.config &> 
>/dev/null && echo "yes" || echo "no")
>
>the shell command is working out of a makefile but in the makefile the 
>HAVE_DEVFS variable only contain the output of the grep command. Does 
>anyone know why it doesn't work ?

make uses /bin/sh.  /bin/sh doesn't understand the >& construct.  It
is not portable.

Use

HAVE_DEVFS := $(shell grep 'CONFIG_DEVFS_FS=y' ../../linux/.config >/dev/null 2>&1 && echo "yes" || echo "no")

instead.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]