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: Tony Theodore
Subject: Re: [Mingw-cross-env-list] mingw-w64 and mingw-cross-env
Date: Mon, 26 Mar 2012 02:47:37 +1100

On 24 March 2012 02:37, Volker Grabsch <address@hidden> wrote:
[...]
> That's why I don't like having separate files or directories
> for each target. I want multiple targets to share as much
> code as possible.

My latest experiment along these lines [1] is to not require specific
build rules for each target. It will fall back to a common
$(PKG)_BUILD if no target-specific one is defined. This saves having
to add the

$(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.

In either case, composable rules [3] and make functions [4] should
take care of the variants with as little duplication as possible.

[...]
> - 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.

Cheers,

Tony


[1] 
https://github.com/tonytheodore/mxe-multi/commit/8ff939551329073345a858703e2f63649e1b2536

[2] 
https://github.com/tonytheodore/mxe-multi/commit/a727eb18f03caeb02546c58fa066f8c38036d058

[3] 
https://github.com/tonytheodore/mxe-multi/blob/1961c567582ba3df0de22624cf4b770645766b70/src/gcc.mk

[4] https://github.com/tonytheodore/mxe-multi/blob/multi/src/openssl.mk

[5] 
https://github.com/tonytheodore/mxe-multi/commit/8ff939551329073345a858703e2f63649e1b2536#L0R44



reply via email to

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