File: rules

package info (click to toggle)
iqtree 1.5.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,780 kB
  • ctags: 11,529
  • sloc: cpp: 96,162; ansic: 59,874; python: 242; sh: 189; makefile: 45
file content (68 lines) | stat: -rwxr-xr-x 2,631 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# DH_VERBOSE := 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

pkg := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
version=$(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
mandir=$(CURDIR)/debian/$(pkg)/usr/share/man/man1/

%:
	dh $@

VARIANTS = omp serial mpi

override_dh_auto_configure: $(foreach variant,$(VARIANTS),dh_auto_configure_$(variant))
override_dh_auto_build:     $(foreach variant,$(VARIANTS),dh_auto_build_$(variant))
override_dh_auto_install:   $(foreach variant,$(VARIANTS),dh_auto_install_$(variant))
override_dh_auto_clean:     $(foreach variant,$(VARIANTS),dh_auto_clean_$(variant))

dh_auto_configure_mpi:
	dh_auto_configure -Bbuild.mpi -- -DIQTREE_FLAGS="mpi"

dh_auto_configure_omp:
	dh_auto_configure -Bbuild.omp -- -DIQTREE_FLAGS="omp"

dh_auto_configure_serial:
	dh_auto_configure -Bbuild.serial -- -DIQTREE_FLAGS=""

dh_auto_build_%:
	dh_auto_build -Bbuild.$(subst dh_auto_build_,,$@)

dh_auto_install_%:
	dh_auto_install -Bbuild.$(subst dh_auto_install_,,$@)

dh_auto_clean_%:
	dh_auto_clean -Bbuild.$(subst dh_auto_clean_,,$@)

override_dh_installexamples:
	dh_installexamples
	# remove example files in unusual dir
	rm -f debian/*/usr/models.nex
	rm -f debian/*/usr/example.[np][eh][xy]

override_dh_installman:
	mkdir -p $(mandir)
	help2man --no-info --no-discard-stderr --help-option="-h" \
	    --name='efficient phylogenetic software by maximum likelihood' \
	    --version-string="$(version)" $(CURDIR)/debian/$(pkg)/usr/bin/iqtree > $(mandir)/iqtree.1
	help2man --no-info --no-discard-stderr --help-option="-h" \
	    --name='efficient phylogenetic software by maximum likelihood (multiprocessor version)' \
	    --version-string="$(version)" $(CURDIR)/debian/$(pkg)/usr/bin/iqtree-omp > $(mandir)/iqtree-omp.1
	help2man --no-info --no-discard-stderr --help-option="-h" \
	    --name='efficient phylogenetic software by maximum likelihood (multiprocessor version)' \
	    --version-string="$(version)" $(CURDIR)/debian/$(pkg)/usr/bin/iqtree-mpi > $(mandir)/iqtree-mpi.1

override_dh_auto_test:
	# use only the first example for build time test to save time on autobuilders
#	if [ "`find $(CURDIR) -name iqtree -type f -executable`" = "" ] ; then \
#		iqtreeomp=`find $(CURDIR) -name iqtree-omp -type f -executable` ; \
#		ln -s iqtree-omp `dirname $$iqtreeomp`/iqtree ; \
#	fi
ifneq ($(shell nproc), 1)
	sed '/ myprefix/,$$d' debian/Documents_source/example.sh > example.short
	echo 'time $(CURDIR)/build.omp/iqtree-omp -s example.phy -omp 2	-redo' >> example.short
	time sh example.short
	rm example.short
endif