#!/usr/bin/make -f

# python-pycparser is the only binary package now, so python_distutils installs
# straight into debian/python-pycparser rather than into a pybuild staging dir.
DESTDIR = debian/python-pycparser

%:
	dh $@ --with python2 --buildsystem=python_distutils

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 $(DESTDIR) -name '*tab.py')

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

override_dh_auto_test:
