#!/usr/bin/make -f

export RUSTUP = 0

# When building packages locally, `env VENDORED=0 CLEAN=0 debuild`
# will build a package using non-vendored dependencies, and
# re-using build artifacts from the last build. Use this in
# local testing.

export VENDORED ?= 1
CLEAN ?= 1

%:
	dh $@

override_dh_auto_clean:
ifeq ($(CLEAN),1)
	make clean
endif
	make version
ifeq ($(VENDORED),1)
	if ! ischroot; then \
		make vendor; \
	fi
endif

override_dh_auto_install:
	dh_auto_install -- prefix=/usr
