File: rules

package info (click to toggle)
code-saturne 4.3.3+repack-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 77,992 kB
  • sloc: ansic: 281,257; f90: 122,305; python: 56,490; makefile: 3,915; xml: 3,285; cpp: 3,183; sh: 1,139; lex: 176; yacc: 101; sed: 16
file content (64 lines) | stat: -rwxr-xr-x 2,090 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
#!/usr/bin/make -f
# Copyright 2009 Sylvestre Ledru <sylvestre@debian.org>

# Exclude cs_config.py from package code-saturne-data:
# It should go into code-saturne-include.
# Exclude extra license file COPYING as well.
binary-install/code-saturne-data:: DEB_DH_INSTALL_ARGS := -Xcs_config.py -XCOPYING

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/autoreconf.mk

# Which MPI implementation?
# set ARCH_DEFAULT_MPI_IMPL
include /usr/share/mpi-default-dev/debian_defaults

DEB_CONFIGURE_USER_FLAGS := --with-mpi --libexecdir=/usr/lib/

ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/$(ARCH_DEFAULT_MPI_IMPL)/libhdf5.so),)
  DEB_CONFIGURE_USER_FLAGS += \
	--with-hdf5-include=/usr/include/hdf5/$(ARCH_DEFAULT_MPI_IMPL) \
	--with-hdf5-lib=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/$(ARCH_DEFAULT_MPI_IMPL)
endif

#--libdir=/usr/lib/code-saturne
DEB_MAKE_CLEAN_TARGET    := distclean
DEB_MAKE_BUILD_TARGET    := all
DEB_MAKE_INSTALL_TARGET  := install DESTDIR=`pwd`/debian/tmp
DEB_COMPRESS_EXCLUDE := .pdf .xml .des .f90 .c

# Enable parallel build when available
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	MAKEFLAGS += -j$(NUMJOBS)
endif	

clean::
	rm -fr docs/doxygen/src
	rm -f po/*.gmo
	rm -f po/POTFILES.in
	rm -f po/code_saturne.pot
	rm -f po/stamp-po
	rm -f src/apps/cs_solver
	rm -f src/mei/mei_parser.[ch] src/mei/mei_scanner.c
	# Uncomment when testing two builds in a row
	#echo "abort-on-upstream-changes" >debian/source/local-options

pre-build::
	# See sbin/bootstrap
	ls preprocessor/*/*.c src/*/*.c* | grep -v user_examples > po/POTFILES.in

install/code-saturne-bin::
	chrpath -d debian/tmp/usr/lib/code_saturne/cs_* debian/tmp/usr/lib/libsaturne.so*

binary-install/code-saturne-data::
	chmod +x debian/code-saturne-data/usr/share/code_saturne/runcase*
	dh_python2 -pcode-saturne-data

binary-install/code-saturne-include::
	dh_python2 -pcode-saturne-include

build/code-saturne-doc::
	$(MAKE) html
	$(MAKE) pdf