File: rules

package info (click to toggle)
pycparser 2.19-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,620 kB
  • sloc: python: 9,147; ansic: 1,788; makefile: 20; sh: 10
file content (28 lines) | stat: -rwxr-xr-x 764 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

export PYBUILD_DESTDIR_python2=debian/python-pycparser
export PYBUILD_DESTDIR_python3=debian/python3-pycparser
export PYBUILD_TEST_ARGS={dir}/tests
export PYBUILD_AFTER_TEST=rm -f {build_dir}/parser.out {build_dir}/lextab.py {build_dir}/yacctab.py

%:
	dh $@ --with python2,python3 --buildsystem pybuild

override_dh_auto_build: clean-source
	cd pycparser && python _build_tables.py
	dh_auto_build

override_dh_auto_clean: clean-source
	dh_auto_clean

override_dh_python2:
	dh_python2
	dh_python-ply $$(find $(PYBUILD_DESTDIR_python2) -name '*tab.py')

override_dh_python3:
	dh_python3
	dh_python3-ply $$(find $(PYBUILD_DESTDIR_python3) -name '*tab.py')

clean-source:
	cd pycparser && rm -f lextab.py yacctab.py c_ast.py
	rm -rf pycparser/ply