Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
8
9 CLANG_V = 21
10 CLANG = clang-$(CLANG_V)
11 GCC = gcc
12
13 ifneq (,$(filter $(DEB_HOST_ARCH),armel))
14 export LIBATOMIC = -latomic
15 endif
16
17 %:
18 dh $@ --builddirectory=build --with autoreconf --parallel
19
20 override_dh_auto_configure:
21 dh_auto_configure -- --with-llvm=/usr/lib/llvm-$(CLANG_V) CLANG_FORMAT=clang-format-$(CLANG_V)
22
23 override_dh_auto_build:
24 dh_auto_build
25
26 ifeq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
27 if which help2man >/dev/null 2>&1; then \
28 v=$$(build/creduce/creduce --help| awk '/^creduce/ { print $$2 }'); \
29 help2man --no-info --name='C and C++ program reducer' --version-string=$$v build/creduce/creduce > debian/creduce.1; \
30 fi
31 endif
32
33 override_dh_auto_test:
34 # these are time consuming ...
35 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
36 ifeq (,$(filter $(DEB_HOST_ARCH),m68k sh4 s390 sparc))
37 if grep -q '^ *frama-c-base' debian/control; then \
38 cd tests && CLANG="$(CLANG)" GCC="$(GCC)" ./run_tests; \
39 else \
40 echo "Cannot run the tests, frama-c-base not in build dependencies."; \
41 fi
42 endif
43 endif
44
45 override_dh_auto_install:
46 dh_auto_install
47 install -D -m 644 debian/creduce.1 debian/creduce/usr/share/man/man1/creduce.1
48
49 override_dh_auto_clean:
50 rm -rf tests/tmp_*
51 dh_auto_clean