1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
#!/usr/bin/make -f
#export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wformat
export DEB_LDFLAGS_MAINT_APPEND =
export BUILD_VERBOSE = 1
export CFLAGS_EXTRA := $(CPPFLAGS) $(CFLAGS)
export LDFLAGS_EXTRA := $(LDFLAGS)
CONFIGPORT := \
STRIP=true FROZEN_MANIFEST=../../debian/config/manifest.py \
MICROPY_SSL_AXTLS=0 MICROPY_SSL_MBEDTLS=1 MICROPY_PY_BTREE=0 \
MICROPY_PY_FFI=1 MICROPY_PY_JNI=1
include /usr/share/dpkg/architecture.mk
ifeq ($(DEB_HOST_ARCH),i386)
# ../py/binary.c:161:5: error: invalid conversion from type ‘_Float16’ without option ‘-msse2’
CFLAGS_EXTRA += -DMICROPY_FLOAT_USE_NATIVE_FLT16=0
endif
ifeq ($(DEB_HOST_ARCH),x32)
# ../py/nlrx64.c:106: Error: operand type mismatch for `movq'
CFLAGS_EXTRA += -DMICROPY_NLR_SETJMP=1
endif
HAVE_NATIVE :=
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 i386 armhf armel))
HAVE_NATIVE := 1
endif
SKIP_TESTS := ussl_basic
ifneq ($(DEB_HOST_ARCH),amd64)
SKIP_TESTS += mpy_native
endif
SKIP_TESTS_ARGS := -e '(?:$(subst $(eval) ,|,$(SKIP_TESTS)))'
%:
dh $@ --with sphinxdoc
%-arch:
dh $@
%-indep:
dh $@ --with sphinxdoc
clean:
dh $@
override_dh_auto_clean-arch:
dh_auto_clean -a --sourcedirectory=ports/unix/
+$(MAKE) -C mpy-cross clean
rm -rf py/__pycache__
override_dh_auto_clean-indep:
-dh_auto_clean -i --sourcedirectory=docs/
override_dh_auto_configure-arch:
dh_auto_build -a --sourcedirectory=mpy-cross/
override_dh_auto_build-arch:
dh_auto_build -a --sourcedirectory=ports/unix/ -- $(CONFIGPORT)
override_dh_auto_build-indep: docs/build/html/
docs/build/html/: docs/conf.py $(wildcard docs/*.rst docs/*/*.rst docs/*/*/*.rst)
python3 -m sphinx docs/ $@
override_dh_auto_test-arch:
# remove all tests, since they cause numerous errors
# dh_auto_test -a --sourcedirectory=ports/unix/ -- $(CONFIGPORT) TESTS_ARGS="$(SKIP_TESTS_ARGS)"
# dh_auto_test -a --sourcedirectory=ports/unix/ -- $(CONFIGPORT) TESTS_ARGS="-d thread jni"
ifdef HAVE_NATIVE
# dh_auto_test -a --sourcedirectory=ports/unix/ -- $(CONFIGPORT) TESTS_ARGS="--emit native $(SKIP_TESTS_ARGS)"
endif
# dh_auto_test -a --sourcedirectory=ports/unix/ -- $(CONFIGPORT) TESTS_ARGS="--via-mpy -d basics float micropython"
ifdef HAVE_NATIVE
# dh_auto_test -a --sourcedirectory=ports/unix/ -- $(CONFIGPORT) TESTS_ARGS="--via-mpy --emit native -d basics float micropython"
endif
override_dh_auto_install-arch:
dh_auto_install -a --sourcedirectory=ports/unix/ -- PREFIX=/usr $(CONFIGPORT)
|