#!/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)

override_dh_auto_configure:
	cmake -DKICAD_STABLE_VERSION=ON .
	cd $(CURDIR)/doc; cmake .
	cd $(CURDIR)/library; cmake .

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 \
	 ./doc/CMakeCache.txt \
	 ./doc/Makefile \
	 ./doc/cmake_install.cmake \
	 ./doc/doc/help/Makefile \
	 ./doc/doc/help/cmake_install.cmake \
	 ./doc/doc/tutorials/Makefile \
	 ./doc/doc/tutorials/cmake_install.cmake \
	 ./doc/internat/Makefile \
	 ./doc/internat/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 \
	 ./library/CMakeCache.txt \
	 ./library/Makefile \
	 ./library/cmake_install.cmake \
	 ./library/library/Makefile \
	 ./library/library/cmake_install.cmake \
	 ./library/modules/Makefile \
	 ./library/modules/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
