diff options
author | midipix <writeonce@midipix.org> | 2018-12-18 07:18:04 -0500 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-12-18 20:38:42 -0500 |
commit | c7965a887ebec956d0935695cca7c834ed061eac (patch) | |
tree | ae7af178570dab8f12a73a632a5a770d3d2830bb /project | |
parent | f14fcefab9deb19af3ca9670bf054b013004f953 (diff) | |
download | sbpython3-c7965a887ebec956d0935695cca7c834ed061eac.tar.bz2 sbpython3-c7965a887ebec956d0935695cca7c834ed061eac.tar.xz |
project: added the bits for python's {prefix}/bin script-based tools.
Diffstat (limited to 'project')
-rw-r--r-- | project/extras.mk | 3 | ||||
-rw-r--r-- | project/pytools.mk | 44 | ||||
-rw-r--r-- | project/tree.mk | 1 |
3 files changed, 48 insertions, 0 deletions
diff --git a/project/extras.mk b/project/extras.mk index 7ad2cc8..389f050 100644 --- a/project/extras.mk +++ b/project/extras.mk @@ -71,3 +71,6 @@ include $(PROJECT_DIR)/project/pydist.mk # pycgen (python's distributed .pyc objects) include $(PROJECT_DIR)/project/pycgen.mk + +# pytools (python's {prefix}/bin script-based tools) +include $(PROJECT_DIR)/project/pytools.mk diff --git a/project/pytools.mk b/project/pytools.mk new file mode 100644 index 0000000..8e46b89 --- /dev/null +++ b/project/pytools.mk @@ -0,0 +1,44 @@ +PYTOOL_2TO3 = 2to3 +PYTOOL_IDLE = idle3 +PYTOOL_PYDOC = pydoc3 +PYTOOL_SRCDIR = tools +PYTOOL_DSTDIR = $(DESTDIR)/$(BINDIR) + +$(PYTOOL_SRCDIR)/%: $(SOURCE_DIR)/Tools/scripts/% tree.tag + 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 diff --git a/project/tree.mk b/project/tree.mk index 3896722..9fecefe 100644 --- a/project/tree.mk +++ b/project/tree.mk @@ -16,4 +16,5 @@ tree.tag: mkdir -p pyext/obj/_multiprocessing mkdir -p pyext/obj/_sha3 mkdir -p pyext/obj/_sqlite + mkdir -p tools touch tree.tag |