summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-11-07 18:13:56 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-11-07 18:39:41 +0300
commit61d74fdef836753cbf1cf0e9ee7b8e50cb80f41d (patch)
treedaab5d53086add05df2565248296eb4a3b3de0c7 /unix
parentbc4441afa753176e1901017708d8a739c38806eb (diff)
downloadmicropython-61d74fdef836753cbf1cf0e9ee7b8e50cb80f41d.tar.gz
micropython-61d74fdef836753cbf1cf0e9ee7b8e50cb80f41d.zip
tools, unix: Replace upip tarball with just source files.
To make its inclusion as frozen modules in multiple ports less magic. Ports are just expected to symlink 2 files into their scripts/modules subdirs. Unix port updated to use this and in general follow frozen modules setup tested and tried on baremetal ports, where there's "scripts" predefined dir (overridable with FROZEN_DIR make var), and a user just drops Python files there.
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile31
1 files changed, 3 insertions, 28 deletions
diff --git a/unix/Makefile b/unix/Makefile
index fd98d2ced2..a14ed215c6 100644
--- a/unix/Makefile
+++ b/unix/Makefile
@@ -1,6 +1,8 @@
-include mpconfigport.mk
include ../py/mkenv.mk
+FROZEN_DIR = scripts
+
# define main target
PROG = micropython
@@ -148,17 +150,6 @@ SRC_C = \
fatfs_port.c \
$(SRC_MOD)
-# Include builtin package manager in the standard build (and coverage)
-ifeq ($(PROG),micropython)
-SRC_C += $(BUILD)/_frozen_upip.c
-else ifeq ($(PROG),micropython_coverage)
-SRC_C += $(BUILD)/_frozen_upip.c
-else ifeq ($(PROG), micropython_nanbox)
-SRC_C += $(BUILD)/_frozen_upip.c
-else ifeq ($(PROG), micropython_freedos)
-SRC_C += $(BUILD)/_frozen_upip.c
-endif
-
LIB_SRC_C = $(addprefix lib/,\
$(LIB_SRC_C_EXTRA) \
timeutils/timeutils.c \
@@ -235,7 +226,7 @@ fast:
# build a minimal interpreter
minimal:
$(MAKE) COPT="-Os -DNDEBUG" CFLAGS_EXTRA='-DMP_CONFIGFILE="<mpconfigport_minimal.h>"' \
- BUILD=build-minimal PROG=micropython_minimal \
+ BUILD=build-minimal PROG=micropython_minimal FROZEN_DIR= \
MICROPY_PY_BTREE=0 MICROPY_PY_FFI=0 MICROPY_PY_SOCKET=0 MICROPY_PY_THREAD=0 \
MICROPY_PY_TERMIOS=0 MICROPY_PY_USSL=0 \
MICROPY_USE_READLINE=0 MICROPY_FATFS=0
@@ -272,22 +263,6 @@ coverage_test: coverage
gcov -o build-coverage/py ../py/*.c
gcov -o build-coverage/extmod ../extmod/*.c
-$(BUILD)/_frozen_upip.c: $(BUILD)/frozen_upip/upip.py
- $(MAKE_FROZEN) $(dir $^) > $@
-
-# Select latest upip version available
-UPIP_TARBALL := $(shell ls -1 -v ../tools/micropython-upip-*.tar.gz | tail -n1)
-
-$(BUILD)/frozen_upip/upip.py: $(UPIP_TARBALL)
- $(ECHO) "MISC Preparing upip as frozen module"
- $(Q)mkdir -p $(BUILD)
- $(Q)rm -rf $(BUILD)/micropython-upip-*
- $(Q)tar -C $(BUILD) -xz -f $^
- $(Q)rm -rf $(dir $@)
- $(Q)mkdir -p $(dir $@)
- $(Q)cp $(BUILD)/micropython-upip-*/upip*.py $(dir $@)
-
-
# Value of configure's --host= option (required for cross-compilation).
# Deduce it from CROSS_COMPILE by default, but can be overriden.
ifneq ($(CROSS_COMPILE),)