#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_clean:
	dh_clean
	$(RM) -r $(CURDIR)/t/logs $(CURDIR)/t/run
override_dh_auto_configure:
	dh_auto_configure -- OPTIMIZE="$(CFLAGS) $(CPPFLAGS) $(shell apr-1-config --includes) $(shell apr-1-config --cflags)"

override_dh_auto_test:
	mkdir -p $(CURDIR)/t/logs
	mkdir -p $(CURDIR)/t/run
	APACHE_TEST_EXTRA_ARGS="-httpd_conf $(CURDIR)/debian/apache2.conf" \
		dh_auto_test
