summaryrefslogtreecommitdiff
path: root/devel/py-cython/tool.mk
blob: 6dc10a1119332bcc725b26433a16d61f62cc37de (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
# $NetBSD: tool.mk,v 1.2 2018/10/23 18:04:52 jperkin Exp $
#
# This mk fragment can be included in all packages that uses `cython'
# and `cythonize' as tools without version suffix.
#
# Keywords: python
#

.if !defined(CYTHON_TOOL_MK)
CYTHON_TOOL_MK=	defined

.if !defined(PYTHON_PYVERSION_MK)
.include "../../lang/python/pyversion.mk"
.endif

BUILDLINK_TARGETS+=	buildlink-bin-cython

.PHONY: buildlink-bin-cython
buildlink-bin-cython:
.for CYTHONTOOL in cython cythonize
	${RUN} \
	f="${PREFIX}/bin/${CYTHONTOOL}-${PYVERSSUFFIX}"; \
	t="${BUILDLINK_DIR}/bin/${CYTHONTOOL}"; \
	if ${TEST} -f $$f -a ! -f $$t ; then \
		${LN} -sf $$f $$t; \
	fi
.endfor
.endif # CYTHON_TOOL_MK