Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 # DH_VERBOSE := 1
4
5 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
6
7 include /usr/share/dpkg/default.mk
8 export DEB_CFLAGS_MAINT_APPEND = -I/usr/lib/$(DEB_HOST_MULTIARCH)/openmpi/include/ -DSIMDE_ENABLE_OPENMP
9 export DEB_CXXFLAGS_MAINT_APPEND = -I/usr/lib/$(DEB_HOST_MULTIARCH)/openmpi/include/ -DSIMDE_ENABLE_OPENMP
10 mandir=$(CURDIR)/debian/$(DEB_SOURCE)/usr/share/man/man1/
11
12 %:
13 dh $@
14
15 VARIANTS = omp serial mpi
16
17 override_dh_auto_configure: $(foreach variant,$(VARIANTS),dh_auto_configure_$(variant))
18 override_dh_auto_build: $(foreach variant,$(VARIANTS),dh_auto_build_$(variant))
19 override_dh_auto_install: $(foreach variant,$(VARIANTS),dh_auto_install_$(variant))
20 override_dh_auto_clean: $(foreach variant,$(VARIANTS),dh_auto_clean_$(variant))
21
22 dh_auto_configure_mpi:
23 dh_auto_configure -Bbuild.mpi -- -DIQTREE_FLAGS="mpi"
24
25 dh_auto_configure_omp:
26 dh_auto_configure -Bbuild.omp -- -DIQTREE_FLAGS="omp"
27
28 dh_auto_configure_serial:
29 dh_auto_configure -Bbuild.serial -- -DIQTREE_FLAGS=""
30
31 dh_auto_build_%:
32 dh_auto_build -Bbuild.$(subst dh_auto_build_,,$@)
33 # restore the old naming to avoid name space conflict with serial build
34 if [ -x build.omp/iqtree3 ] ; then mv build.omp/iqtree3 build.omp/iqtree3-omp ; fi
35
36 dh_auto_install_%:
37 if [ "$(subst dh_auto_install_,,$@)" != "omp" ] ; then dh_auto_install -Bbuild.$(subst dh_auto_install_,,$@); fi
38
39 override_dh_install:
40 dh_install
41 find debian -name iqtree3-mpi -exec chrpath --delete \{\} \;
42 find debian -name iqtree3-omp -exec chrpath --delete \{\} \;
43
44 dh_auto_clean_%:
45 dh_auto_clean -Bbuild.$(subst dh_auto_clean_,,$@)
46
47 override_dh_installexamples:
48 # somehow the example config is installed in /usr by cmake
49 find debian/$(DEB_SOURCE) -name example.cf -delete
50 dh_installexamples
51 # remove example files in unusual dir
52 rm -f debian/*/usr/models.nex
53 rm -f debian/*/usr/example.[np][eh][xy]
54
55 override_dh_installman:
56 mkdir -p $(mandir)
57 help2man --no-info --no-discard-stderr --help-option="-h" \
58 --name='efficient phylogenetic software by maximum likelihood' \
59 --version-string="$(DEB_VERSION_UPSTREAM)" $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin/iqtree3 > $(mandir)/iqtree3.1
60 help2man --no-info --no-discard-stderr --help-option="-h" \
61 --name='efficient phylogenetic software by maximum likelihood (multiprocessor version)' \
62 --version-string="$(DEB_VERSION_UPSTREAM)" $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin/iqtree3-omp > $(mandir)/iqtree3-omp.1
63 help2man --no-info --no-discard-stderr --help-option="-h" \
64 --name='efficient phylogenetic software by maximum likelihood (multiprocessor version)' \
65 --version-string="$(DEB_VERSION_UPSTREAM)" $(CURDIR)/debian/$(DEB_SOURCE)/usr/bin/iqtree3-mpi > $(mandir)/iqtree3-mpi.1
66
67 override_dh_auto_test:
68 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
69 # use only the first example for build time test to save time on autobuilders
70 # if [ "`find $(CURDIR) -name iqtree -type f -executable`" = "" ] ; then \
71 # iqtreeomp=`find $(CURDIR) -name iqtree-omp -type f -executable` ; \
72 # ln -s iqtree-omp `dirname $$iqtreeomp`/iqtree ; \
73 # fi
74 ifneq ($(shell nproc), 1)
75 sed '/ myprefix/,$$d' debian/Documents_source/example.sh > example.short
76 echo 'time $(CURDIR)/build.omp/iqtree3-omp -s example.phy -redo' >> example.short
77 time sh example.short
78 rm example.short
79 endif
80 endif