[Geany-devel] Remove MSYS dependency of Geany on Win~1

Matthew Brush mbrush at xxxxx
Fri Jun 22 20:08:22 UTC 2012


On 12-06-22 09:23 AM, Nick Treleaven wrote:
> On 19/06/2012 22:25, Matthew Brush wrote:
>> On 12-06-19 10:12 AM, Dimitar Zhekov wrote:
>>> Hi,
>>>
>>> Now that 1.22 is out, how about removing the MSYS build dependency
>>> under Win~1? I tried to compile Geany with the default MinGW make,
>>> without any MSYS, and there were some easily fixable problems:
>>>
>>> cd foo&& $(MAKE) -f makefile.win32&& cd ..\..
>>>
>>> does not work, probably requires some sh. But if we depend on GNU make
>>> (which seems to be the case, since we're using ifdef/else/endif), it's
>>> easier and shorter to:
>>>
>>> $(MAKE) -C foo -f makefile.win32
>
> OK.
>
>>> Linking does not work, because the stock make supports \ only for
>>> variables, not commands. But that's even easier to fix:
>
> OK.
>
>>> There is also some inconsistency: CP = copy, but "cp -r" and "cp" at
>>> the end of makefile. The install target can be rewritten as several
>>> -$(MD) and non-recursive $(CP) commands, and no MSYS will be required.
>
> Sigh. Is there no equivalent of 'cp -r' on Windows?
>
>>> RFC. If we consider this worthy, I can make the required changes.
>
> Sounds good.
>
>> I have started working on this before:
>> https://gist.github.com/1494603
>>
>> It builds but isn't perfect, like it doesn't do the icon/resource stuff,
>> and doesn't use win32-conf.h properly, but it might be useful for a
>> starting point. It's what I use for testing Geany on Windows.
>
> I did respond to this before (maybe with a laundry list of suggestions),
> but off the top of my head, the main ones for me are:
>
> * it doesn't show the commands, so devs won't notice e.g if CFLAGS
> aren't correctly set
> * no support for building from MSYS
>
> I haven't actually tested the makefile, but the idea of a single file is
> appealing, e.g. we can avoid duplication for GTK_CFLAGS, etc.
>

I guess for those GTK_CFLAGS and friends, we could put them into a 
separate make file that gets included in the others, either in localvars 
thing or a separate common-win32.mk or something.

Also, on the topic of improving the win32 makefiles, we should make sure 
that all paths are quoted because IIRC last time I tried to use them, 
stuff like this[1] made it blow up when my PREFIX was (for example), 
`C:/Documents and Settings/...` (ie. spaces in the filename).

Cheers,
Matthew Brush

[1] https://github.com/geany/geany/blob/master/src/makefile.win32#L23



More information about the Devel mailing list