prefix=/usr/local
bindir=$(prefix)/bin
sysconfdir=$(prefix)/etc

install: chknewconf chkperm chkdirs
	mkdir -p $(bindir) $(sysconfdir)
	install -m 755 chknewconf $(bindir)
	install -m 640 chkperm $(sysconfdir)
	install -m 640 chkdirs $(sysconfdir)

dist: chknewconf chkperm chkdirs Makefile
	VER=`./chknewconf -v`; \
	rm -rf chknewconf-$$VER; \
	mkdir chknewconf-$$VER; \
	cp chknewconf chkperm chkdirs Makefile chknewconf-$$VER; \
	tar -zcf chknewconf-$$VER.tar.gz chknewconf-$$VER; \
	rm -rf chknewconf-$$VER
