PREFIX = /usr

all: install install-man

docs:
	pod2man --section=8 --official --center="Debian GNU/Linux" rcconf > rcconf.8
	pod2man --section=8 --official --center="Debian GNU/Linux" update-rcconf-guide > update-rcconf-guide.8

clean:
	-rm -f rcconf.8
	-rm -f update-rcconf-guide.8

install-man: docs
	install -m 644 rcconf.8 $(prefix)/usr/share/man/man8/
	install -m 644 update-rcconf-guide.8 $(prefix)/usr/share/man/man8/

install:
	env
	install -m 755 rcconf $(PREFIX)/sbin/
	install -m 755 update-rcconf-guide $(PREFIX)/sbin/
