emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Latest EMACS on BZR trunk does not compile with MinGW


From: Vincent Belaïche
Subject: RE: Latest EMACS on BZR trunk does not compile with MinGW
Date: Thu, 5 Jun 2014 11:03:57 +0200

Er, I feel a bit awkward that I have caused such a long discussion. 

After adding a

source /etc/profile

line at the top of my ~/.bash_profile, everything went ok.

I think that MSYS users should simply keep the definition from the 
/etc/profile, I simply did not realize when I created my ~/.bash_profile that 
the /etc/profile would no longer be sourced.

Anyway, shouldn't it be delegated to autotools to do that job of detecting the 
environement and whether the user is a naughty boy/girl that did not sourced 
his/her /etc/profile...

In the EMACS source code you would then just use some

#ifdef HAVE_WIN32_LEAN_AND_MEAN
...
#endif 

Where HAVE_WIN32_LEAN_AND_MEAN would be from the config.h file generated by 
autotools.

That would be wiser as other programs than EMACS could have the same case, so 
it is not worth re-inventing the wheel every time.

So the way forward should be to ask autotools people whether any such thing as 
HAVE_WIN32_LEAN_AND_MEAN already exists, and if not make some contribution, eg 
based on the pwd -W suggestion made, or on making some C test program + try and 
compile it, as autotools often do.

VBR,
   Vincent.

----------------------------------------
> Date: Thu, 5 Jun 2014 09:03:03 +0200
> Subject: Re: Latest EMACS on BZR trunk does not compile with MinGW
> From: address@hidden
> To: address@hidden
> CC: address@hidden
>
>>>> How 'bout testing a functionality on which we rely during the build,
>>>> rather than looking for some indirect evidence?
>>>
>>> Chicken-and-egg problem: that test is there so that we could source
>>> nt/mingw-cfg.site file, which does what you want.
>>
>> Why not test if the preprocessor defines __MINGW32__?
>
> Another alternative, just for the record: AFAIK, only the MSYS bash
> supports a "-W" switch for its "pwd" command.
>
> So, we could do something like:
>
> if pwd -W 1>/dev/null 2>&1
> then
> echo This is MSYS
> else
> echo This is not MSYS
> fi
>
> --
> Dani Moncayo
>
                                          


reply via email to

[Prev in Thread] Current Thread [Next in Thread]