Annotation of pkgsrc/lang/python/tool.mk, revision 1.2
1.2 ! nia 1: # $NetBSD: tool.mk,v 1.1 2011/10/14 08:55:54 obache Exp $
1.1 obache 2: #
3: # Create `python' interpreter wrapper for applicable Python bin.
4: #
5: # This mk fragment can be included in all packages that uses `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}; \
! 25: if ${TEST} -f "${PYTHONBIN}" -a ! -f $$t; then \
! 26: ${LN} -sf "${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>