| @@ -1,32 +1,36 @@ | | | @@ -1,32 +1,36 @@ |
1 | # $NetBSD: build.mk,v 1.18 2023/06/27 10:41:25 riastradh Exp $ | | 1 | # $NetBSD: build.mk,v 1.19 2023/09/16 13:21:23 tnn Exp $ |
2 | | | 2 | |
3 | MESON_REQD?= 0 | | 3 | MESON_REQD?= 0 |
4 | .for version in ${MESON_REQD} | | 4 | .for version in ${MESON_REQD} |
5 | TOOL_DEPENDS+= meson>=${version}:../../devel/meson | | 5 | TOOL_DEPENDS+= meson>=${version}:../../devel/meson |
6 | .endfor | | 6 | .endfor |
7 | | | 7 | |
8 | CONFIGURE_DIRS?= . | | 8 | CONFIGURE_DIRS?= . |
9 | BUILD_DIRS?= ${CONFIGURE_DIRS} | | 9 | BUILD_DIRS?= ${CONFIGURE_DIRS} |
10 | INSTALL_DIRS?= ${CONFIGURE_DIRS} | | 10 | INSTALL_DIRS?= ${CONFIGURE_DIRS} |
11 | TEST_DIRS?= ${CONFIGURE_DIRS} | | 11 | TEST_DIRS?= ${CONFIGURE_DIRS} |
12 | | | 12 | |
13 | .PHONY: meson-configure meson-build meson-install meson-test | | 13 | .PHONY: meson-configure meson-build meson-install meson-test |
14 | | | 14 | |
15 | # pkgsrc contains multiple llvm-config executables at multiple locations. | | 15 | # pkgsrc contains multiple llvm-config executables at multiple locations. |
16 | .if !empty(LLVM_CONFIG_PATH) | | 16 | .if !empty(LLVM_CONFIG_PATH) |
17 | MAKE_ENV+= LLVM_CONFIG_PATH=${LLVM_CONFIG_PATH:Q} | | 17 | MAKE_ENV+= LLVM_CONFIG_PATH=${LLVM_CONFIG_PATH:Q} |
18 | .endif | | 18 | .endif |
19 | | | 19 | |
| | | 20 | # Prevent use of "response files" that break pkgsrc wrappers. |
| | | 21 | # The default threshold of 64k is too low for pkgsrc. |
| | | 22 | MAKE_ENV+= MESON_RSP_THRESHOLD=262144 |
| | | 23 | |
20 | .if !defined(USE_CMAKE) | | 24 | .if !defined(USE_CMAKE) |
21 | MAKE_ENV+= CMAKE=${TOOLS_PATH.false} | | 25 | MAKE_ENV+= CMAKE=${TOOLS_PATH.false} |
22 | .endif | | 26 | .endif |
23 | | | 27 | |
24 | .include "../../mk/bsd.prefs.mk" | | 28 | .include "../../mk/bsd.prefs.mk" |
25 | | | 29 | |
26 | .if ${USE_CROSS_COMPILE:U:tl} == yes | | 30 | .if ${USE_CROSS_COMPILE:U:tl} == yes |
27 | MESON_CPU_FAMILY.amd64= x86_64 | | 31 | MESON_CPU_FAMILY.amd64= x86_64 |
28 | MESON_CPU_FAMILY.arm26?= arm | | 32 | MESON_CPU_FAMILY.arm26?= arm |
29 | MESON_CPU_FAMILY.arm32?= arm | | 33 | MESON_CPU_FAMILY.arm32?= arm |
30 | MESON_CPU_FAMILY.earm?= arm | | 34 | MESON_CPU_FAMILY.earm?= arm |
31 | MESON_CPU_FAMILY.earmeb?= arm | | 35 | MESON_CPU_FAMILY.earmeb?= arm |
32 | MESON_CPU_FAMILY.earmhf?= arm | | 36 | MESON_CPU_FAMILY.earmhf?= arm |