View | Details | Raw Unified | Return to bug 230517 | Differences between
and this patch

Collapse All | Expand All

(-)dcompiler.mk (+64 lines)
Line 0 Link Here
1
# $FreeBSD$
2
#
3
# This file contains logic to ease porting of D binaries using the
4
# ldc2|gdc|dmd (ldmd2|gdmd) commands.
5
#
6
# Feature:	d compiler
7
# Usage:	USES=dcompiler
8
# Valid ARGS:	(none), minver
9
#
10
# (none)	Setup DC
11
# minver	Checks to make sure that the d compiler version >=
12
#		minver.
13
#
14
# You can set the following variables to control the process.
15
#
16
# DC
17
#	The path to the choossen/found compiler (ldc2|gdc|dmd)
18
#
19
# DC_COMPAT
20
#	The path to a dmd compatible compiler driver like ldmd2|gdmd|dmd
21
#
22
# DFLAGS
23
#	Addional DFLAGS variables to be passed to the D compiler
24
#
25
# MAINTAINER: ddegroot@talon.nl
26
27
.if !defined(_INCLUDE_USES_D_MK)
28
_INCLUDE_USES_D_MK=	yes
29
30
.if !empty(d_ARGS) && ${d_ARGS:Nminver}
31
IGNORE=	USES=d only accepts no arguments or 'modules'
32
.endif
33
34
# Settable variables
35
#DFLAGS+=
36
37
# Read-only variables
38
#DC=		${LOCALBASE}/bin/gdc
39
#DC_COMPAT=	${LOCALBASE}/bin/gdmd
40
41
#.if ${d_ARGS:Mminver}
42
#.else
43
#.endif
44
45
.if exists(${LOCALBASE}/bin/ldc2)
46
DC=		${LOCALBASE}/bin/ldc2
47
DC_COMPAT=	${LOCALBASE}/bin/ldmd2
48
BUILD_DEPENDS+=	${DC}:lang/ldc
49
.elif exists(${LOCALBASE}/bin/gdc*)
50
DC=		${LOCALBASE}/bin/gdc
51
DC_COMPAT=	${LOCALBASE}/bin/gdmd
52
BUILD_DEPENDS+=	${DC}:lang/gdc
53
.elif exists(${LOCALBASE}/bin/dmd)
54
DC=		${LOCALBASE}/bin/dmd
55
DC_COMPAT=	${LOCALBASE}/bin/dmd
56
BUILD_DEPENDS+=	${DC}:lang/dmd
57
.else
58
DC=		${LOCALBASE}/bin/ldc2
59
DC_COMPAT=	${LOCALBASE}/bin/ldmd2
60
BUILD_DEPENDS+=	${DC}:lang/ldc
61
.endif
62
63
_USES_POST+=	dcompiler
64
.endif # !defined(_INCLUDE_USES_DCOMPILER_MK)

Return to bug 230517