#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

PKGDIR = $(CURDIR)/debian/node-typescript/

override_dh_clean:
	dh_clean
	rm -rf $(CURDIR)/built/
	rm -f $(CURDIR)/scripts/processDiagnosticMessages.js
	rm -f $(CURDIR)/scripts/processDiagnosticMessages.js.map
	rm -f $(CURDIR)/src/compiler/diagnosticInformationMap.generated.ts

override_dh_auto_build:
	jake

override_dh_install:
	dh_install
	sed -i 's|node|nodejs|;s|../lib/|typescript/|' $(PKGDIR)/usr/bin/tsc

override_dh_auto_test:
	jake tests

%:
	dh $@

.PHONY: override_dh_clean override_dh_auto_build override_dh_auto_test \
	override_dh_install
