diff options
author | obache <obache> | 2011-10-14 08:55:54 +0000 |
---|---|---|
committer | obache <obache> | 2011-10-14 08:55:54 +0000 |
commit | c442c0a22908f0bc75254efaa219ec2055f55732 (patch) | |
tree | 683ff25da428aec2eaffba313fd18d3666e94cc1 /lang/python | |
parent | 65e4ec1a2054a921b0623b6d6c3fef978692403e (diff) | |
download | pkgsrc-c442c0a22908f0bc75254efaa219ec2055f55732.tar.gz |
Add make fragment for easy to use python as tool.
Diffstat (limited to 'lang/python')
-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 |