File: rules

package info (click to toggle)
espresso 5.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 146,004 kB
  • ctags: 17,245
  • sloc: f90: 253,041; sh: 51,271; ansic: 27,494; tcl: 15,570; xml: 14,508; makefile: 2,958; perl: 2,035; fortran: 1,924; python: 337; cpp: 200; awk: 57
file content (72 lines) | stat: -rwxr-xr-x 2,177 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
#!/usr/bin/make -f
# -*- makefile -*-

#export DH_VERBOSE=1

include /usr/share/mpi-default-dev/debian_defaults

DEB_BUILD_ARCH_CPU=$(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)

export SCALAPACK_LIBS:=-lscalapack-$(ARCH_DEFAULT_MPI_IMPL) -lblacs-$(ARCH_DEFAULT_MPI_IMPL) -lblacsF77init-$(ARCH_DEFAULT_MPI_IMPL)
export SCALAPACK_LIB:=/usr/lib
ifeq ($(DEB_BUILD_ARCH_CPU), i386)
    export FFTW_FORCE_ALIGN=-D_FFTW_FORCE_UNALIGNED
else
    export FFTW_FORCE_ALIGN=
endif
export OMPI_MCA_orte_rsh_agent=/bin/false

%:
	dh $@ --with autotools_dev --parallel

override_dh_auto_configure:
	dh_auto_configure -- --with-elpa=/usr

override_dh_auto_clean:
	dh_auto_clean
	(cd TDDFPT/Examples; $(MAKE) clean)
	find PW/examples -name "results" | xargs rm -rf
	find PW/examples/tests -name "*.out" | xargs rm -rf
	rm -rf CPV/tmp
	rm -f install/make_wannier90.sys
	rm -f install/make_lapack.inc
	rm -f install/make_blas.inc
	rm -f include/fft_defs.h
	rm -f Modules/version.f90.tmp
	# work-around for shipped binary in upstream tarball
	rm -f CPV/src/wfdd.x
	rm -f TDDFPT/ColorCalculator/*.jar
	find TDDFPT/ColorCalculator -name "*.class" | xargs rm -f

override_dh_auto_build:
	$(MAKE) all

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	# Copy in some required pseudo-potentials which are shipped in other 
	# parts of the source tree
	(cd pseudo; for i in \
		TDDFPT/Examples/pseudo/C.pz-rrkjus.UPF \
		TDDFPT/Examples/pseudo/H.pz-vbc.UPF \
		TDDFPT/Examples/pseudo/O.pbe-rrkjus.UPF \
		TDDFPT/Examples/pseudo/O.pz-rrkjus.UPF \
		TDDFPT/Examples/pseudo/Si.pbe-rrkj.UPF \
		atomic/examples/pseudo-LDA-0.5/Si.pz-vbc.UPF \
	; do ln -sf ../$$i .; done)
	-(cd PW/tests; sh ./check-pw.x.j)
	-(cd CPV/tests; sh ./check-cp.x.j)
	-(cd TDDFPT/Examples; $(MAKE) small_test)
	# Remove symliked pseudo-potentials again
	find pseudo -type l | xargs rm -f
endif

override_dh_installchangelogs:
	dh_installchangelogs Doc/release-notes

binary-indep:
	dh $@ --before dh_auto_build --with autotools_dev --parallel
	(cd pseudo; ../PW/src/generate_vdW_kernel_table.x)
	(cd Doc; $(MAKE))
	dh $@ --after dh_auto_test --with autotools_dev --parallel

binary: binary-arch binary-indep