#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE=1

%:
	dh $@ --parallel

override_dh_clean:
	dh_clean
	find . -type d -name CMakeFiles | xargs rm -rf
	rm -f $(GENERATED_FILES)
	debian/clean_sourceless_pdf

override_dh_auto_configure:
	cmake -DKICAD_STABLE_VERSION=ON .

override_dh_compress:
	dh_compress --exclude=.pdf

GENERATED_FILES = ./3d-viewer/Makefile \
	 ./3d-viewer/cmake_install.cmake \
	 ./CMakeCache.txt \
	 ./CTestTestfile.cmake \
	 ./DartConfiguration.tcl \
	 ./Makefile \
	 ./bitmap2component/Makefile \
	 ./bitmap2component/cmake_install.cmake \
	 ./bitmaps_png/Makefile \
	 ./bitmaps_png/cmake_install.cmake \
	 ./cmake_install.cmake \
	 ./cmake_uninstall.cmake \
	 ./common/Makefile \
	 ./common/cmake_install.cmake \
	 ./config.h \
	 ./cvpcb/Makefile \
	 ./cvpcb/cmake_install.cmake \
	 ./demos/Makefile \
	 ./demos/cmake_install.cmake \
	 ./eeschema/Makefile \
	 ./eeschema/cmake_install.cmake \
	 ./eeschema/plugins/Makefile \
	 ./eeschema/plugins/cmake_install.cmake \
	 ./gerbview/Makefile \
	 ./gerbview/cmake_install.cmake \
	 ./kicad/Makefile \
	 ./kicad/cmake_install.cmake \
	 ./pcb_calculator/Makefile \
	 ./pcb_calculator/cmake_install.cmake \
	 ./pcbnew/Makefile \
	 ./pcbnew/cmake_install.cmake \
	 ./polygon/Makefile \
	 ./polygon/cmake_install.cmake \
	 ./polygon/kbool/src/Makefile \
	 ./polygon/kbool/src/cmake_install.cmake \
	 ./potrace/Makefile \
	 ./potrace/cmake_install.cmake \
	 ./template/Makefile \
	 ./template/cmake_install.cmake \
	./Testing/Temporary/CTestCostData.txt \
	./Testing/Temporary/LastTest.log \
	./install_manifest.txt \
	./pcbnew/pcad2kicadpcb_plugin/Makefile \
	./pcbnew/pcad2kicadpcb_plugin/cmake_install.cmake \
	./tools/Makefile \
	./tools/cmake_install.cmake \
	./version.h
