delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/06/09/03:53:12

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; q=dns; s=default; b=ssF
RD+T4iGFwOWUJHArL5cEEjveMSS5vJSlO6/tjPdLwHfI8lLZeoAgVbAz+TJaLGBp
LUmfsuE/Y/aefL5t/MPPjXmSoCGbbfo08kG3aRjPLZkh/77mRPqYKEZU1gGUv7jR
qCoIY9CUOe4OwbetCZhGKa5cfpR+tFEtT7tof5Xc=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:content-type
:content-transfer-encoding:mime-version; s=default; bh=0aAros4/8
zoZSLbnMiiFIQytdwc=; b=Bm88767m7Nw/Sw2wQ10Iq8QiATatIuM6snNoyRobn
oeSb3GnQWGHCk9A2aLbVCcKZFYfQTRVj73C7Wx0weBuYgSkuAQLlfzgMtzdMBCmU
Zeiz7BYF9+MPYzktTMS5R3zzhex4D1kHo07SOc1VQ4I/uYy7iSROMiKX+UFpPL1s
lc=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
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
From: "Cufi, Carles" <Carles DOT Cufi AT nordicsemi DOT no>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: git 2.8.3 spurious output
Date: Thu, 9 Jun 2016 07:52:38 +0000
Message-ID: <087DA9770269374FB58D517AC05CCA3F017497826F@mbx04.nvlsi.no>
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u597r7P4022057

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?
> 
> Donât 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.
> 
> 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 âmingwâ script I wrote to temporarily shift my Cygwin
> environment to MinGW mode:
> 
>     #!/bin/sh
>     PATH=/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
> 
> You also need that ~/.mingwrc file:
> 
>     alias make=mingw32-make
>     PS1='MinGW: \W \$ â

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 forces 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 PATH 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, thanks!


> Thereâs a way to avoid splitting the code between two files, but it
> would require a slightly more complicated command, so I wonât tell you
> how.  (If you figure it out, youâll probably agree that itâs worth
> splitting the code like this.)
> 
> 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.
> 
> Because this creates a subshell, you can just âexitâ 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


- Raw text -


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