aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/Uses/ninja.mk
blob: 30029f692963c1d50363a770be7aecf16367d68b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# $FreeBSD$
#
# Provide support to use Ninja
#
# Feature:      ninja
# Usage:        USES=ninja
#
# User defined variables:
# NINJA_VERBOSE     - Enable verbose output.
#
# MAINTAINER: portmgr@FreeBSD.org

.if !defined(_INCLUDE_USES_NINJA_MK)
_INCLUDE_USES_NINJA_MK= yes

.if !empty(ninja_ARGS)
IGNORE= Incorrect 'USES+= ninja:${ninja_ARGS}' ninja takes no arguments
.endif

.if defined(NINJA_VERBOSE)
MAKE_ARGS+= -v
.endif

BUILD_DEPENDS+= ninja:devel/ninja

CMAKE_ARGS+=    -GNinja
MAKEFILE=
MAKE_CMD=   ninja
MAKE_FLAGS=
# Set a minimal job of 1
_MAKE_JOBS= -j${MAKE_JOBS_NUMBER}
_DESTDIR_VIA_ENV=   yes

.endif