This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: git 2.8.3 spurious output

On Jun 8, 2016, at 8:19 AM, Cufi, Carles wrote:
> So what's the better way of fixing this? Making /mingw/bin/ have UNIX line endings or replacing it with the proper Cygwin 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:

    /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 \$ â

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.
Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]