#!/usr/bin/make -f
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/dpatch.mk

common-build-indep:: debian/stamp-local-build
debian/stamp-local-build:: copyright registry dtd2vim.1 vimplate.1
	touch $@

.PHONY: copyright
copyright:
	debian/vim-scripts.pl $@ > debian/copyright
.PHONY: registry
registry:
	debian/vim-scripts.pl $@ > debian/vim-registry/vim-scripts.yaml
.PHONY: doc
doc:
	debian/vim-scripts.pl $@
.PHONY: maintainer
maintainer: copyright registry doc

dtd2vim.1: debian/dtd2vim.xml
	xsltproc /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl $<
vimplate.1: bin/vimplate
	pod2man $< $@

clean:: local-clean
local-clean::
	rm -f dtd2vim.1 vimplate.1
	rm -f debian/stamp-local-build
