#!/usr/bin/make -f

JAVA_HOME = /usr/lib/jvm/default-java

override_dh_auto_build:
	ant -f make/build.xml
	dh_auto_build
	JTREG_HOME=./dist/jtreg/lib/ help2man --name="Regression Test Harness" \
	 --help-option="-help" ./dist/jtreg/linux/bin/jtdiff > jtdiff.1
	JTREG_HOME=./dist/jtreg/lib/ help2man --name="Regression Test Harness" \
	 --help-option="-help" ./dist/jtreg/linux/bin/jtreg > jtreg.1

override_dh_auto_clean:
	rm -rf dist
	rm -rf build
	rm -f jtdiff.1
	rm -f jtreg.1
	dh_auto_clean

%:
	dh $@ --with javahelper
