summaryrefslogtreecommitdiff
path: root/devel/buildtool/buildlink3.mk
blob: a59048e5995f26edb665ca4a6f88659364824436 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
# $NetBSD: buildlink3.mk,v 1.3 2005/05/13 16:35:02 jlam Exp $

BUILDLINK_DEPTH:=		${BUILDLINK_DEPTH}+
BUILDTOOL_BUILDLINK3_MK:=	${BUILDTOOL_BUILDLINK3_MK}+

.if !empty(BUILDLINK_DEPTH:M+)
BUILDLINK_DEPENDS+=	buildtool
.endif

BUILDLINK_PACKAGES:=	${BUILDLINK_PACKAGES:Nbuildtool}
BUILDLINK_PACKAGES+=	buildtool

.if !empty(BUILDTOOL_BUILDLINK3_MK:M+)
BUILDLINK_DEPENDS.buildtool+=	buildtool>=0.16
BUILDLINK_PKGSRCDIR.buildtool?=	../../devel/buildtool
BUILDLINK_DEPMETHOD.buildtool?=	build

BUILDTOOL=		${BUILDLINK_PREFIX.buildtool}/bin/buildtool

HAS_CONFIGURE=		yes
CONFIGURE_SCRIPT=	${BUILDTOOL} config
CONFIGURE_ENV+=		BT_FLAGS_CC=${CFLAGS:Q}
CONFIGURE_ENV+=		BT_FLAGS_CPP=${CPPFLAGS:Q}
CONFIGURE_ENV+=		BT_FLAGS_CXX=${CXXFLAGS:Q}
CONFIGURE_ENV+=		BT_FLAGS_LD=${LDFLAGS:Q}
CONFIGURE_ENV+=		BT_PROG_AWK=${AWK:Q}
CONFIGURE_ENV+=		BT_PROG_CC=${CC:Q}
CONFIGURE_ENV+=		BT_PROG_CXX=${CXX:Q}
CONFIGURE_ENV+=		BT_PROG_LD=${LD:Q}
CONFIGURE_ENV+=		BT_PROG_M4=${M4:Q}
CONFIGURE_ARGS+=	--prefix=${PREFIX}

.if !target(do-build)
do-build:
	${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${WRKSRC} && \
		${SETENV} ${MAKE_ENV} ${BUILDTOOL} build
.endif

.if !target(do-install)
do-install:
	${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${WRKSRC} && \
		${SETENV} ${MAKE_ENV} ${BUILDTOOL} install
.endif

.endif	# BUILDTOOL_BUILDLINK3_MK

BUILDLINK_DEPTH:=     ${BUILDLINK_DEPTH:S/+$//}