File: rules

package info (click to toggle)
uthash 2.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,632 kB
  • ctags: 1,091
  • sloc: ansic: 8,622; makefile: 195; perl: 87; sh: 50; cpp: 30
file content (48 lines) | stat: -rwxr-xr-x 1,241 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

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

# Use a temporary build directory.
# We cannot build the documentation in its source directory
# because upstream already includes a compiled version of the
# documentation. Running 'make' will overwrite the files, leaving
# the source directory dirty.
BUILD_DIR=debian/build-dir


%:
	dh $@

.PHONY: override_dh_auto_build
override_dh_auto_build:
	# Build 'libut.a' static library
	$(MAKE) -C libut
	# Build documentation (use a temp build directory)
	mkdir -p $(BUILD_DIR)/html
	cp --archive doc/* $(BUILD_DIR)/html/
	$(MAKE) -C $(BUILD_DIR)/html clean
	$(MAKE) -C $(BUILD_DIR)/html

.PHONY: override_dh_installdocs
override_dh_installdocs:
	# Don't install Changelog twice, keep lintian happy
	dh_installdocs --exclude=html/ChangeLog.txt

.PHONY: override_dh_auto_test
override_dh_auto_test:
	# Run both testsuites
	$(MAKE) -C tests
	$(MAKE) -C libut tests

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	# Clean 'libut' directory
	$(MAKE) -C libut clean
	# Clean uthash testsuite
	$(MAKE) -C tests clean
	# Remove temp build directory
	$(RM) -r $(BUILD_DIR)
	# Clean the rest of the files defined in 'd/clean'
	dh_auto_clean