#!/usr/bin/make -f

%:
	dh $@ --with sphinxdoc

override_dh_auto_configure:
	touch stamp-config_h.in
	dh_auto_configure

override_dh_auto_build:
	./remake
	help2man src/gappa --no-info --no-discard-stderr > debian/gappa.1
	sphinx-build doc html

override_dh_auto_install:
	DESTDIR=$(CURDIR)/debian/tmp ./remake install


override_dh_auto_clean:
	if test -f remake; then \
	  ./remake clean; \
	fi
	rm -f src/parser/lexer.cpp src/parser/parser.cpp src/parser/parser.hpp
	rm -f stamp-config_h* config.status config.log config.h
	rm -f Remakefile .remake remake
	rm -rf html/
