From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106482 invoked by alias); 9 Jun 2016 07:52:56 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 106469 invoked by uid 89); 9 Jun 2016 07:52:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: ironport02.nordicsemi.no Received: from mail.nordicsemi.no (HELO ironport02.nordicsemi.no) (194.19.86.146) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Jun 2016 07:52:42 +0000 Received: from unknown (HELO CAS02.nvlsi.no) ([192.9.200.204]) by ironport02.nordicsemi.no with ESMTP; 09 Jun 2016 09:52:39 +0200 Received: from MBX04.nvlsi.no ([fe80::6912:55af:448c:53f4]) by CAS02.nvlsi.no ([fe80::1949:971e:e5a2:cb04%13]) with mapi id 14.03.0123.003; Thu, 9 Jun 2016 09:52:39 +0200 From: "Cufi, Carles" To: "cygwin@cygwin.com" Subject: Re: git 2.8.3 spurious output Date: Thu, 09 Jun 2016 07:52:00 -0000 Message-ID: <087DA9770269374FB58D517AC05CCA3F017497826F@mbx04.nvlsi.no> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SW-Source: 2016-06/txt/msg00122.txt.bz2 Hi there, > On Jun 8, 2016, at 8:19 AM, Cufi, Carles wrote: > > > > So what's the better way of fixing this? Making /mingw/bin/gettext.sh > have UNIX line endings or replacing it with the proper Cygwin gettext.sh > that I seem to be missing? >=20 > Don=E2t try to mix the Cygwin and MinGW build systems. Having MinGW in > the PATH while developing under Cygwin is one way to make such mistakes, > since anything not found under Cygwin falls back to MinGW. >=20 > Instead, treat MinGW as a special mode separate from normal Cygwin > operation. MSYS is one way, but I prefer to use Cygwin most of the > time, then run a =E2mingw=E2 script I wrote to temporarily shift my Cygwin > environment to MinGW mode: >=20 > #!/bin/sh > PATH=3D/cygdrive/c/mingw/bin:/cygdrive/c/windows:\ > /cygdrive /c/windows/system32:/cygdrive/c/cygwin/bin > echo "Say 'exit' to leave MinGW shell and restore Cygwin > environment." > /bin/bash --rcfile ~/.mingwrc >=20 > You also need that ~/.mingwrc file: >=20 > alias make=3Dmingw32-make > PS1=3D'MinGW: \W \$ =E2 This sounds like a very good idea, but the problem is that sometimes I need= to run mingw commands from standard Windows Command Prompts. That then for= ces me to have the MinGW bin folders in Window's PATH, which caused all the= trouble in the first place apparently. Someone else has mentioned that having the MinGW binaries in the system PAT= H is not a good idea, so I might simply get rid of that. But I will save this script and try it out for when I want bash + mingw, th= anks! > There=E2s a way to avoid splitting the code between two files, but it > would require a slightly more complicated command, so I won=E2t tell you > how. (If you figure it out, you=E2ll probably agree that it=E2s worth > splitting the code like this.) >=20 > The result is that your PATH temporarily shadows the Cygwin build tools > with MinGW ones, excepting for make(1) which is named differently under > MinGW, so we have to use an alias instead. >=20 > Because this creates a subshell, you can just =E2exit=E2 to get back out = of > MinGW mode into Cygwin mode, having never left the directory you were in > when you entered MinGW mode. This is a really neat trick to be able to run MinGW from within Cygwin and = without having to resort to MSYS. I don't mind having 2 files really, so I don't think I'll try to figure out= how to merge them. Thanks for all the feedback. Carles -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple