diff options
author | midipix <writeonce@midipix.org> | 2018-12-06 19:17:57 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-12-06 21:34:00 -0500 |
commit | e98fff55cf94c3355a4a9fe1804bb6b2f16c82c2 (patch) | |
tree | 1105a17b9afdeecb243d0592da863a18541d977c /project/pytools.mk | |
parent | cb88ad742e1e8c8bf8b71477207e9a58c5601a8f (diff) | |
download | sbpython2-e98fff55cf94c3355a4a9fe1804bb6b2f16c82c2.tar.bz2 sbpython2-e98fff55cf94c3355a4a9fe1804bb6b2f16c82c2.tar.xz |
project: added the bits for python's {prefix}/bin script-based tools.
Diffstat (limited to 'project/pytools.mk')
-rw-r--r-- | project/pytools.mk | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/project/pytools.mk b/project/pytools.mk new file mode 100644 index 0000000..d9c967a --- /dev/null +++ b/project/pytools.mk @@ -0,0 +1,44 @@ +PYTOOL_2TO3 = 2to3 +PYTOOL_IDLE = idle +PYTOOL_PYDOC = pydoc +PYTOOL_SRCDIR = tools +PYTOOL_DSTDIR = $(DESTDIR)/$(BINDIR) + +$(PYTOOL_SRCDIR)/%: $(SOURCE_DIR)/Tools/scripts/% + PYCOPY_PYTHON=$(PYCOPY_PYTHON) \ + PYCOPY_PREFIX=$(PYCOPY_PREFIX) \ + PYCOPY_DSTDIR=$(PYTOOL_SRCDIR) \ + $(PYCOPY) $< + +PYTOOLS = \ + $(PYTOOL_SRCDIR)/$(PYTOOL_2TO3) \ + $(PYTOOL_SRCDIR)/$(PYTOOL_IDLE) \ + $(PYTOOL_SRCDIR)/$(PYTOOL_PYDOC) + +pytools: $(PYTOOLS) + +pytools-clean: + rm -f $(PYTOOLS) + +pytools-install:$(PYTOOLS) + mkdir -p $(PYTOOL_DSTDIR) + + cp -p $(PYTOOL_SRCDIR)/$(PYTOOL_2TO3) $(PYTOOL_DSTDIR)/$(PYTOOL_2TO3)-$(PYTHON_VER) + cp -p $(PYTOOL_SRCDIR)/$(PYTOOL_IDLE) $(PYTOOL_DSTDIR)/$(PYTOOL_IDLE)$(PYTHON_VER) + cp -p $(PYTOOL_SRCDIR)/$(PYTOOL_PYDOC) $(PYTOOL_DSTDIR)/$(PYTOOL_PYDOC)$(PYTHON_VER) + + ln -s $(PYTOOL_2TO3)-$(PYTHON_VER) $(PYTOOL_DSTDIR)/$(PYTOOL_2TO3)-$(PYTHON_MAJOR).tmp + ln -s $(PYTOOL_IDLE)$(PYTHON_VER) $(PYTOOL_DSTDIR)/$(PYTOOL_IDLE)$(PYTHON_MAJOR).tmp + ln -s $(PYTOOL_PYDOC)$(PYTHON_VER) $(PYTOOL_DSTDIR)/$(PYTOOL_PYDOC)$(PYTHON_MAJOR).tmp + + mv $(PYTOOL_DSTDIR)/$(PYTOOL_2TO3)-$(PYTHON_MAJOR).tmp $(PYTOOL_DSTDIR)/$(PYTOOL_2TO3)-$(PYTHON_MAJOR) + mv $(PYTOOL_DSTDIR)/$(PYTOOL_IDLE)$(PYTHON_MAJOR).tmp $(PYTOOL_DSTDIR)/$(PYTOOL_IDLE)$(PYTHON_MAJOR) + mv $(PYTOOL_DSTDIR)/$(PYTOOL_PYDOC)$(PYTHON_MAJOR).tmp $(PYTOOL_DSTDIR)/$(PYTOOL_PYDOC)$(PYTHON_MAJOR) + +all: pytools + +install: pytools-install + +clean: pytools-clean + +.PHONY: pytools pytools-install |