File: rules

package info (click to toggle)
lammps 0~20161109.git9806da6-7
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 248,460 kB
  • ctags: 80,635
  • sloc: cpp: 701,185; python: 33,420; fortran: 26,434; ansic: 11,340; sh: 6,108; perl: 4,104; makefile: 2,891; xml: 2,590; f90: 1,690; objc: 238; lisp: 169; tcl: 61; csh: 16; awk: 14
file content (43 lines) | stat: -rwxr-xr-x 1,644 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
#!/usr/bin/make -f

export OMPI_MCA_plm_rsh_agent=/bin/false                #workaround to start MPI-applications in chroot
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
    MAKEFLAGS += -j$(NUMJOBS)
endif

disable_auto_test_archs_mpi = hurd-i386 mips mipsel mips64el s390 s390x
disable_auto_test_archs_simpl = mips64el

%:
	dh $@ --parallel

override_dh_auto_clean:
	cd src; make clean-all
	dh_clean

override_dh_auto_build-arch:
	cd src; $(MAKE) yes-all; $(MAKE) no-lib; $(MAKE) mpi
	mv src/lmp_mpi src/lammps

override_dh_auto_build-indep:
	cd doc; $(MAKE) old; $(MAKE) pdf

override_dh_auto_test-arch:
ifeq (,$(filter $(DEB_HOST_ARCH),$(disable_auto_test_archs_simpl)))
	mkdir test; cp examples/crack/* test/
	cd test; ./../src/lammps < in.crack
	rm -rf test
endif
ifeq (,$(filter $(DEB_HOST_ARCH),$(disable_auto_test_archs_mpi)))
	mkdir test; cp examples/crack/* test/
	cd test; mpirun -np 2 --oversubscribe ./../src/lammps < in.crack
	rm -rf test
endif

override_dh_fixperms-indep:
	dh_fixperms -i
	find $(CURDIR)/debian/lammps-doc/usr/share/doc/lammps-doc/examples/USER/ -type f -print -exec chmod 644 {} \; 
	find $(CURDIR)/debian/lammps-doc/usr/share/doc/lammps-doc/examples/vashishta/ -type f -print -exec chmod 644 {} \; 
	find $(CURDIR)/debian/lammps-doc/usr/share/doc/lammps-doc/ -type f -print0 | xargs -0 sed -i 's/https:\/\/cdn\.mathjax\.org\/mathjax\/latest\/MathJax.js?config=TeX-AMS-MML_HTMLorMML/\/usr\/share\/javascript\/mathjax\/config\/TeX-AMS-MML_HTMLorMML\.js/g'
	rm -rf $(CURDIR)/debian/lammps-doc/usr/share/doc/lammps-doc/doc/doc2