Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de)
From: Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru>
To: sg@broesel.sv.newtron.net, cygwin@cygwin.com
Subject: RE: make, sh, bash and echo
Date: Tue, 31 Jul 2001 15:41:34 +0400
Message-ID: <003401c119b5$c0538ac0$21c9ca95@mow.siemens.ru>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="koi8-r"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
In-Reply-To: <200107311059.f6VAxtc27922@broesel.sv.newtron.net>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2479.0006
Importance: Normal


>
> Makefile:
>
> all:
> 	echo -ne "foo\nbar" > bar
>
> $ make --unix
> $ cat bar
> -ne foo\nbar
>
> Seems like the wrong echo is executed because SHELL is
> /bin/sh.exe and PATH isn't set correctly, you know why.
> On Unix of course the right one and only echo is executed.

It is inherently non-portable. You cannot expect echo to understand any
option at all.

> If I add the line SHELL=/bin/bash.exe it works the way i expect.
>

The way you expect is not neccessarily how it works in real life.

> Is there any better solution ?
>

Yes, use portable constructs. Look in Autoconf manual that has good overview
of common portability problems with assorted tools (including echo).


-andrej

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

