File: rules

package info (click to toggle)
libmime-lite-html-perl 1.24-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 884 kB
  • sloc: perl: 713; makefile: 24
file content (32 lines) | stat: -rwxr-xr-x 761 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
#!/usr/bin/make -f

FILES_MODIFIED_BY_BUILD = $(shell find t -type f -regex '.*\.\(cid\|extern\|location\)' | sed 's/\.keep//')

override_dh_auto_configure:
	dh_auto_configure
	for file in $(FILES_MODIFIED_BY_BUILD); do \
		if [ -e $$file ] && [ ! -e $$file.keep ] ; then \
			cp $$file $$file.keep ; \
		fi \
	done

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# Recreate ref files
	# Ignore non-zero exit code that occurs since no tests are run
	-perl -Iblib/lib t/20create_image_part.t 1
	-perl -Iblib/lib t/50generic.t 1
	dh_auto_test
endif

override_dh_auto_clean:
	dh_auto_clean
	for file in $(FILES_MODIFIED_BY_BUILD); do \
		if [ -e $$file.keep ] ; then \
			rm -f $$file; \
			mv $$file.keep $$file; \
		fi \
	done

%:
	dh $@