File: rules

package info (click to toggle)
pasdoc 0.15.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,212 kB
  • sloc: pascal: 26,311; makefile: 439; sh: 371; xml: 21
file content (45 lines) | stat: -rwxr-xr-x 1,465 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# the newly created binary is needed for the test-suite, so put it on the path
# I actually only want to do this while running the test-suite, but I can't
# figure out how to do that in a Makefile
export PATH:=${PATH}:$(shell pwd)/bin

%:
	dh ${@}

override_dh_auto_clean:
	dh_auto_clean
	make -C tests clean
	# I wish I could clean source/component here, but then the build-tools
	# target FTBFS, so clean in the override_dh_auto_build target instead.
#	make -C source/component clean
	make -C source/component/images clean
	make -C source/component/tipue clean

override_dh_auto_configure:
	ln -s /usr/share/javascript/jquery/jquery.js     source/component/tipue/
	ln -s /usr/share/javascript/jquery/jquery.min.js source/component/tipue/
	dh_auto_configure

override_dh_auto_build:
	# Make sure we regenerate all the generated *.inc files. Unfortunately, we
	# need two binaries that FTBFS without the *.inc files to start with.
	make build-tools
	make -C source/component clean all
	make -C source/component/images all
	make -C source/component/tipue all
	dh_auto_build

	# Use the help from the binary to create a man page as none is supplied.
	help2man --output=pasdoc.1 --name="documentation tool for Pascal source code" \
		 --no-info bin/pasdoc

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	cd tests && ./run_all_tests.sh
endif