File: rules

package info (click to toggle)
mpich 3.3-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 131,836 kB
  • sloc: ansic: 975,868; cpp: 57,437; f90: 53,762; perl: 19,562; xml: 12,464; sh: 12,303; fortran: 7,875; makefile: 7,078; ruby: 126; java: 100; python: 98; lisp: 19; php: 8; sed: 4
file content (115 lines) | stat: -rwxr-xr-x 3,443 bytes parent folder | download
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#! /usr/bin/make -f

export DH_VERBOSE=1

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export MPICHLIB_CPPFLAGS=$(shell dpkg-buildflags --get CPPFLAGS)
export MPICHLIB_CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
export MPICHLIB_CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS)
export MPICHLIB_FFLAGS=$(shell dpkg-buildflags --get FFLAGS)
export MPICHLIB_FCFLAGS=$(shell dpkg-buildflags --get FFLAGS)
export FC=f95
export F77=f77
export TZ=UTC+0

AUTOGENERATED:= libmpich-dev.prerm libmpich-dev.postinst libmpich-dev.links \
	mpich.preinst libmpich-dev.preinst

# Keep old library naming scheme
export MPILIBNAME=mpich

NO_ROMIO_ARCH:= hurd-i386
NO_VERBS_ARCH:= hurd-i386 kfreebsd-amd64 kfreebsd-i386 s390x
FABRIC_ARCH:= amd64 i386 
BUILTIN_ATOMICS_ARCH:= armhf riscv64 hppa

ifneq (,$(findstring  " $(DEB_HOST_ARCH)",$(NO_VERBS_ARCH)))
	VERBS := --with-ibverbs
endif
ifneq (,$(findstring $(DEB_HOST_ARCH),$(BUILTIN_ATOMICS_ARCH)))
	DISABLE_BUILTIN_ATOMICS:= --with-atomic-primitives=no
endif
ifneq (,$(findstring $(DEB_HOST_ARCH),$(FABRIC_ARCH)))
	FABRIC := --with-libfabric
endif

extra_flags += \
	$(VERBS) \
	$(FABRIC) \
	$(DISABLE_BUILTIN_ATOMICS) \
	--enable-shared \
	--prefix=/usr \
	--enable-fortran=all \
	--disable-rpath \
	--disable-wrapper-rpath \
	--sysconfdir=/etc/mpich \
	--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
	--includedir=/usr/include/$(DEB_HOST_MULTIARCH)/mpich \
	--docdir=/usr/share/doc/mpich 


# On sparc and sh4, OPA isn't available, so we need to fallback to
# emulation mode. There's a performance penalty, unfortunately.
ifneq (,$(findstring $(DEB_HOST_GNU_CPU),sparc sh4))
	extra_flags += --with-atomic-primitives=no
endif

%:
	dh $@  --with=fortran_mod

override_dh_autoreconf:
	./autogen.sh
	autoreconf -f -i src/mpl src/openpa src/mpi/romio src/pm/hydra \
		src/mpid/ch4/netmod/ucx/ucx src/mpid/ch4/netmod/ofi/libfabric

override_dh_auto_clean:
	dh_clean
	rm -f $(patsubst %, debian/%, ${AUTOGENERATED})

override_dh_auto_configure:
	for f in ${AUTOGENERATED} ; do \
                sed -e 's%TRIPLET%${DEB_HOST_MULTIARCH}%g' < debian/$$f.in  > debian/$$f ; \
                done
	dh_auto_configure -- $(extra_flags) CPPFLAGS="" CFLAGS="" CXXFLAGS="" FFLAGS="" FCFLAGS=""

override_dh_auto_build-indep:
	dh_auto_build -i
	# Disable rebuilding pdfs for the moment due to pdflatex problem 
	# cd $(CURDIR)/doc/installguide; rm *.pdf; $(MAKE) install.pdf
	# cd $(CURDIR)/doc/logging; rm *.pdf; $(MAKE) logging.pdf
	#cd $(CURDIR)/doc/smpd; rm *.pdf; $(MAKE) smpd_pmi.pdf
	#cd $(CURDIR)/doc/userguide; rm *.pdf; $(MAKE) user.pdf

override_dh_auto_install-arch:
	dh_auto_install -a

	# Rename executables (ignore upstream symlinks)
	for i in mpicc mpicxx mpifort; do \
	  (cd debian/tmp/usr/bin/ && mv $$i $$i.mpich); \
	done

    # Rename manpages
	for i in mpicc mpicxx mpiexec mpif77 mpifort; do \
	  (cd debian/tmp/usr/share/man/man1/ && mv $$i.1 $$i.mpich.1);\
	done

	# Fix incorrect paths in /usr/bin/mpi{cc,cxx,fort}.mpich
	for fn in debian/tmp/usr/bin/mpicc.mpich debian/tmp/usr/bin/mpicxx.mpich \
		debian/tmp/usr/bin/mpifort.mpich; do \
		sed -i 's:$(CURDIR)/debian/tmp/::g' $$fn ;\
	done


override_dh_installchangelogs:
	dh_installchangelogs README

# Some tests are failing on hurd-i386.
# Disable them, to be investiated later
# disable_test_archs = hurd-i386
disable_test_archs = 
ifneq (,$(filter $(DEB_HOST_ARCH),$(disable_test_archs)))
override_dh_auto_test:

endif