#!/usr/bin/make -f

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

export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

override_dh_auto_build:
	dh_auto_build
	$(MAKE) parser

override_dh_auto_clean:
	dh_auto_clean

	find $(CURDIR) -name \*.o -delete
	find $(CURDIR) -name \*.pyc -delete

	rm -f $(CURDIR)/python-src/config.log
	rm -f $(CURDIR)/python-src/config.status
	rm -f $(CURDIR)/python-src/pyconfig.h
	rm -f $(CURDIR)/python-src/python
	rm -f $(CURDIR)/python-src/libpython2.7-kdevelop.*
	rm -f $(CURDIR)/python-src/Makefile
	rm -f $(CURDIR)/python-src/Makefile.pre
	rm -f $(CURDIR)/python-src/Misc/python.pc
	rm -f $(CURDIR)/python-src/Modules/config.c
	rm -f $(CURDIR)/python-src/Modules/ld_so_aix
	rm -f $(CURDIR)/python-src/Modules/Setup
	rm -f $(CURDIR)/python-src/Modules/Setup.config
	rm -f $(CURDIR)/python-src/Modules/Setup.local
	rm -f $(CURDIR)/python-src/Parser/pgen

%:
	dh $@ --parallel --list-missing --with kde

.PHONY: override_dh_auto_test
