mingw-cross-env-list
[Top][All Lists]
Advanced

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

Re: [Mingw-cross-env-list] mingw-w64 and mingw-cross-env


From: Volker Grabsch
Subject: Re: [Mingw-cross-env-list] mingw-w64 and mingw-cross-env
Date: Mon, 26 Mar 2012 12:10:29 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Tony Theodore schrieb:
> 
> $(PKG)_BUILD_i686-static-mingw32=$($(PKG)_BUILD)
> $(PKG)_BUILD_x86_64-static-mingw32=$($(PKG)_BUILD)
> ...
> 
> rules, but it does require having to add some sort rule for failing
> builds [2]. It's hard to tell which is better:
> 
> 1. Implicit rules when not specified and define rules for failing packages
> 2. Explicit rules always and skip failures with a missing (or empty) rule
>
> 1 is less code and looks cleaner, but I'm leaning back towards 2 for
> the extra clarity.

I alse have a strong feeling that 2) is the better approach
in the long run.

Although it requires some more typing when adding a new
target, this is also ensures that the new target is only
added for packages which actually do build flawlessly there.

Moreover, it doesn't enforce a specific way of sharing
code. For instance, if a package needs very different
build commands for static/dynamic builds, we could just
define $(PKG)_BUILD_static and $(PKG)_BUILD_dynamic, then
defining

$(PKG)_BUILD_i686-static-mingw32    = $($(PKG)_BUILD_static)
$(PKG)_BUILD_i686-dynamic-mingw32   = $($(PKG)_BUILD_dynamic)
$(PKG)_BUILD_x86_64-static-mingw32  = $($(PKG)_BUILD_static)
$(PKG)_BUILD_x86_64-dynamic-mingw32 = $($(PKG)_BUILD_dynamic)

> > - Most packages use the same build code for all toolchains,
> >  with a small conditional about static/dynamic builds.
> 
> What do you think of something like a LINK_STYLE variable [5]? I
> imagine this would work in the simple cases.

Looks great!


Regards,
Volker

-- 
Volker Grabsch
---<<(())>>---



reply via email to

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