Annotation of pkgsrc/lang/python/tool.mk, revision 1.4
1.4 ! riastrad 1: # $NetBSD: tool.mk,v 1.3 2019/12/15 23:59:00 gutteridge Exp $
1.1 obache 2: #
3: # Create `python' interpreter wrapper for applicable Python bin.
4: #
1.3 gutterid 5: # This mk fragment can be included in all packages that use `python'
1.2 nia 6: # as a tool without a pkgsrc-style version suffix.
1.1 obache 7: #
8: # Keywords: python
9: #
10:
11: .if !defined(PYTHON_TOOL_MK)
12: PYTHON_TOOL_MK= defined
13:
14: .if !defined(PYTHON_PYVERSION_MK)
15: .include "../../lang/python/pyversion.mk"
16: .endif
17:
18: BUILDLINK_TARGETS+= buildlink-bin-python
19:
20: .PHONY: buildlink-bin-python
21: buildlink-bin-python:
1.2 nia 22: .for bin in python python${PYVERSSUFFIX:R}
1.1 obache 23: ${RUN} \
1.2 nia 24: t=${BUILDLINK_DIR}/bin/${bin}; \
1.4 ! riastrad 25: if ${TEST} -f "${TOOL_PYTHONBIN}" -a ! -f $$t; then \
! 26: ${LN} -sf "${TOOL_PYTHONBIN}" $$t; \
1.1 obache 27: fi
1.2 nia 28: .endfor
1.1 obache 29:
30: .endif # PYTHON_TOOL_MK
CVSweb <webmaster@jp.NetBSD.org>