delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/07/10:11:34

X-Spam-Check-By: sourceware.org
Message-ID: <45508870.9090603@adacore.com>
Date: Tue, 07 Nov 2006 14:21:52 +0100
From: Nicolas Roche <roche AT adacore DOT com>
User-Agent: Thunderbird 1.5.0.7 (Windows/20060909)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com, Dan_Wilks AT intuit DOT com
Subject: Re: bash CR and backquotes trouble
References: <454A2CE4 DOT 7030805 AT adacore DOT com> <454A3DC0 DOT 9040305 AT cygwin DOT com> <454A33A8 DOT 9050508 AT adacore DOT com> <454A47CD DOT 50009 AT cygwin DOT com> <454A3BB4 DOT 3060808 AT adacore DOT com> <454A5E6E DOT 9020704 AT cygwin DOT com>
In-Reply-To: <454A5E6E.9020704@cygwin.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Larry Hall (Cygwin) a écrit :
> On 11/02/2006, Nicolas Roche wrote:
>> Will try Dan solution with the new version of bash. As I said in my 
>> previous mail, if you are interesting in the results I will send them. 
>
> Why not.

Ok, here are the results of my experiences. I have set my environment so 
that igncr is the default in order to avoid the issue with backquotes 
and win32/mingw commands

What I did is the following:
- put shopt -s igncr in my .bashrc file
- source .bashrc in  .bash_profile

This solve the cases for which bash is used interactively either as a 
login shell or not.

For non interactive sessions, I use BASH_ENV variable along with 
SHELL=/bin/bash so that gnu make works correctly.

The only remaining issue is when bash is invoked as /bin/sh and that the 
shell is non interactive. In this case, the bash documentation says that no
startup file is read ..... So I don't know how to set igncr by 
default.... The issue occurs for example with mklibgcc when building GCC.

mklibgcc is using /bin/sh and generates a makefile called libgcc.mk

The trouble here is that CR characters are inserted in the resulting 
libgcc.mk in the middle of some lines, so the CR characters won't be 
ignored when make -f libgcc.mk is invoked....

Is there any way to set the default behavior of sh even in non 
interactive mode ?

Thanks in advance
Nicolas








--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019