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
|
#!/usr/bin/make -f
# DH_VERBOSE := 1
export LC_ALL=C.UTF-8
CLANG_SKIP=i386 alpha hppa ia64 m68k sh4 x32
# i386 is due to https://github.com/simd-everywhere/simde/issues/683
# ppc64 is due to https://github.com/simd-everywhere/simde/issues/185
include /usr/share/dpkg/default.mk
export DEB_BUILD_MAINT_OPTIONS=hardening=+all
ifneq (,$(filter $(DEB_BUILD_ARCH),armel))
export DEB_LDFLAGS_MAINT_APPEND=-latomic
endif
%:
dh $@ --buildsystem=meson+ninja
override_dh_auto_configure:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
ifeq (,$(filter $(DEB_HOST_ARCH),$(CLANG_SKIP)))
CC=clang CXX=clang++ dh_auto_configure --builddirectory=clang_test
endif
# According to https://wiki.debian.org/ArchitectureSpecificsMemo#Architecture_baselines
# It is odd that gcc doesn't include this automatically, but clang does
ifneq (,$(filter $(DEB_BUILD_ARCH),ppc64))
export DEB_CFLAGS_MAINT_APPEND+=-maltivec
export DEB_CXXFLAGS_MAINT_APPEND+=-maltivec
endif
CC=gcc CXX=g++ dh_auto_configure --builddirectory=gcc_test
endif
override_dh_auto_build:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_build --builddirectory=gcc_test
ifeq (,$(filter $(DEB_HOST_ARCH),$(CLANG_SKIP)))
dh_auto_build --builddirectory=clang_test
endif
endif
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
dh_auto_test --builddirectory=gcc_test
ifeq (,$(filter $(DEB_HOST_ARCH),$(CLANG_SKIP)))
dh_auto_test --builddirectory=clang_test
endif
endif
override_dh_auto_clean:
dh_auto_clean --builddirectory=gcc_test
ifeq (,$(filter $(DEB_HOST_ARCH),$(CLANG_SKIP)))
dh_auto_clean --builddirectory=clang_test
endif
override_dh_auto_install:
echo This is a header-only library, no need to install any binaries
|