diff options
author | obache <obache@pkgsrc.org> | 2011-10-14 08:55:54 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2011-10-14 08:55:54 +0000 |
commit | 1d0f6a1bc80a3660cbc7d47f3b880a960b57ab9c (patch) | |
tree | 683ff25da428aec2eaffba313fd18d3666e94cc1 /lang | |
parent | 9ed55cc5143ffbc6190a44691dbd603510256311 (diff) | |
download | pkgsrc-1d0f6a1bc80a3660cbc7d47f3b880a960b57ab9c.tar.gz |
Add make fragment for easy to use python as tool.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/python/tool.mk | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lang/python/tool.mk b/lang/python/tool.mk new file mode 100644 index 00000000000..df406612c23 --- /dev/null +++ b/lang/python/tool.mk @@ -0,0 +1,29 @@ +# $NetBSD: tool.mk,v 1.1 2011/10/14 08:55:54 obache Exp $ +# +# Create `python' interpreter wrapper for applicable Python bin. +# +# This mk fragment can be included in all packages that uses `python' +# as a tool without version suffix. +# +# Keywords: python +# + +.if !defined(PYTHON_TOOL_MK) +PYTHON_TOOL_MK= defined + +.if !defined(PYTHON_PYVERSION_MK) +.include "../../lang/python/pyversion.mk" +.endif + +BUILDLINK_TARGETS+= buildlink-bin-python + +.PHONY: buildlink-bin-python +buildlink-bin-python: + ${RUN} \ + f="${PYTHONBIN}"; \ + t="${BUILDLINK_DIR}/bin/python"; \ + if ${TEST} -f $$f -a ! -f $$t ; then \ + ${LN} -sf $$f $$t; \ + fi + +.endif # PYTHON_TOOL_MK |