#!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) CLANG_V = 13 #ifneq (,$(filter $(DEB_HOST_ARCH), armel armhf)) # CLANG_V=9 #else # CLANG_V=11 #endif CLANG = clang-$(CLANG_V) GCC = gcc ifneq (,$(filter $(DEB_HOST_ARCH),armel)) export LIBATOMIC = -latomic endif %: dh $@ --with autoreconf --parallel override_dh_auto_configure: dh_auto_configure -- --with-llvm=/usr/lib/llvm-$(CLANG_V) CLANG_FORMAT=clang-format-$(CLANG_V) override_dh_auto_build: dh_auto_build ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH)) if which help2man >/dev/null 2>&1; then \ v=$$(creduce/creduce --help| awk '/^creduce/ { print $$2 }'); \ help2man --no-info --name='C and C++ program reducer' --version-string=$$v creduce/creduce > debian/creduce.1; \ fi endif override_dh_auto_test: # these are time consuming ... ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) ifeq (,$(filter $(DEB_HOST_ARCH),m68k sh4 s390 sparc)) if grep -q '^ *frama-c-base' debian/control; then \ cd tests && CLANG="$(CLANG)" GCC="$(GCC)" ./run_tests; \ else \ echo "Cannot run the tests, frama-c-base not in build dependencies."; \ fi endif endif override_dh_auto_install: dh_auto_install install -D -m 644 debian/creduce.1 debian/creduce/usr/share/man/man1/creduce.1 override_dh_auto_clean: rm -rf tests/tmp_* dh_auto_clean