Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com X-Envelope-Sender-Is: Andrej DOT Borsenkow AT mow DOT siemens DOT ru (at relayer david.siemens.de) From: Borsenkow Andrej To: sg AT broesel DOT sv DOT newtron DOT net, cygwin AT cygwin DOT 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/