#!/usr/bin/make -f

# Enable compiler hardening flags.
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow

DOCS = debian/libxmltooling-doc/usr/share/doc/libxmltooling-doc

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    DEBUG = --enable-debug
else
    DEBUG =
endif

override_dh_auto_configure:
	dh_auto_configure -- --disable-dependency-tracking $(DEBUG)

override_dh_installdocs:
	dh_installdocs -A doc/NOTICE.txt
	set -e; if [ -d "$(DOCS)" ] ; then \
	    if [ -f "$(DOCS)/html/jquery.js" ] ; then \
		rm $(DOCS)/html/jquery.js ; \
		ln -s /usr/share/javascript/jquery/jquery.min.js \
		    $(DOCS)/html/jquery.js ; \
	    fi ; \
	fi

%:
	dh $@ --with autotools_dev,pkgkde_symbolshelper
