File: rules

package info (click to toggle)
dynare 4.6.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 74,896 kB
  • sloc: cpp: 98,057; ansic: 28,929; pascal: 13,844; sh: 5,947; objc: 4,236; yacc: 4,215; makefile: 2,583; lex: 1,534; fortran: 877; python: 647; ruby: 291; lisp: 152; xml: 22
file content (50 lines) | stat: -rwxr-xr-x 1,652 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
#!/usr/bin/make -f

include /usr/share/octave/debian/defs.make

# The following is used by dh_elpa(1) for determining the package version number
include /usr/share/dpkg/pkg-info.mk
export DEB_VERSION_UPSTREAM

# Needed for texlive to respect SOURCE_DATE_EPOCH when setting date (#974957)
export FORCE_SOURCE_DATE=1

%:
	dh $@ --with sphinxdoc,elpa

# Disable multi-arch path
override_dh_auto_configure:
	dh_auto_configure -- --disable-matlab --libdir=/usr/lib

override_dh_auto_build:
# Also build PDF and HTML docs (unless nodoc is given)
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
	dh_auto_build -- all pdf html
else
	dh_auto_build
endif

# Don't run the testsuite
override_dh_auto_test:

# Needed for "make distclean" (since we disabled MATLAB at configure level)
execute_before_dh_auto_clean:
	-[ -f Makefile ] && echo -e "distclean:\n\t-rm -f Makefile" > mex/build/matlab/Makefile

execute_after_dh_install:
	# Remove auto-generated files which cause reproducibility
	# issues and need to be regenerated to use. (#974959)
	rm -f debian/dynare-matlab/usr/src/matlab/dynare-matlab/mex/sources/Makefile
	rm -rf debian/dynare-matlab/usr/src/matlab/dynare-matlab/mex/build/matlab/autom4te.cache/

execute_after_dh_installdocs-indep:
	cp -dR doc/manual/build/html/ debian/dynare-doc/usr/share/doc/dynare/dynare.html

override_dh_link:
	dh_link --package=dynare /usr/lib/dynare/matlab/dynare.m $(MDIR)/dynare.m

# Generate a versioned dependency on octave.
# This is to avoid the situation where the dependency on liboctaveNN is
# satisfied, but does not correspond to the version of octave installed.
execute_before_dh_gencontrol:
	dh_octave_substvar