Shell brace expansion in make works?

Rolf Campbell rcampbell@tropicnetworks.com
Sun Feb 9 21:28:00 GMT 2003


William A. Gatliff wrote:
> I have a Makefile with a command like this:
> 
>  mkdir -p /opt/billgatliff/{usr,lib}
> 
> Works fine under Linux, but not on the latest Cygwin.
> 
> Under Cygwin, what I actually get is a directory called "{usr",
> instead of "usr".  Other variations on this brace expansion (in tar
> arguments, etc.) produce similar problems.
> 
> I checked this:
> 
> $ set | grep SHELL
> SHELL=/bin/bash
> 
> Seems fine.  But when I do this:
> 
> $ make SHELL=/bin/sh ...
                     ^^ "bash"
> 
> I actually get what I'm after, i.e. "usr" instead of "{usr".
I'm guessing that you meant to type "bash" in the email.  Either way, 
cygwin make seems to ignore the environment variable SHELL, and uses 
'/bin/sh' unless you specify on the command-line or in the makefile.

I was able to reproduce this.

Use this as a makefile
all:
         echo a{1,2}

Then run "make" and it will output "a{1,2}", but if you run "make 
SHELL=/bin/bash" it will output "a1 a2".

-Rolf



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list