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

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

DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')

manpages = $(shell cat debian/manpages)

%.1: %.pod
	pod2man -c 'Haskell devscripts documentation' -r 'Haskell devscripts $(DEB_VERSION)' $< > $@

%.1: %
	pod2man -c 'Haskell devscripts documentation' -r 'Haskell devscripts $(DEB_VERSION)' $< > $@

.PHONY: build
build: $(manpages)

install-stamp:
	dh install

.PHONY: install
install: install-stamp

binary-indep-stamp: install-stamp
	dh binary-indep
	touch $@

.PHONY: binary-indep
binary-indep: binary-indep-stamp

.PHONY: binary-arch
binary-arch: install-stamp

.PHONY: binary
binary: binary-indep-stamp

.PHONY: clean
clean:
	dh clean
	rm -f $(manpages)


