File: rules

package info (click to toggle)
byacc 1%3A2.0.20241231-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,956 kB
  • sloc: ansic: 102,104; yacc: 6,280; sh: 4,406; makefile: 172
file content (33 lines) | stat: -rwxr-xr-x 863 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
#!/usr/bin/make -f

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

export DEB_BUILD_MAINT_OPTIONS := hardening=+all qa=+bug reproducible=+all

%:
	dh $@

# dh_autoreconf interferes with portability -- skip it
override_dh_autoreconf:
	echo "skip: dh_autoreconf autoreconf-dickey -- -f -i"

override_dh_auto_configure:
	dh_auto_configure -- \
		--enable-warnings \
		--verbose \
		--enable-stdnoreturn \
		--enable-btyacc \
		--program-transform-name='s,^yacc,byacc,'

	# workaround for whatis, consistent naming
	sed -i \
		-e '/^\.TH/s, YACC, BYACC,' \
		-e '/^\.ds/s, Yacc, Byacc,' \
		-e '/^\.ds/s, yacc, byacc,' \
		-e '/- an LALR/s,^..N,byacc,' \
		yacc.1

	# omit tests which rely upon getopt error-messages
	sed -i.bak '/MYFILE=nosuchfile/,/# Test special cases/d' test/run_test.sh
	diff -u test/run_test.sh.bak test/run_test.sh || echo OK