Makefile.am 655 Bytes
Newer Older
1 2 3 4 5 6 7
edit = sed \
	-e 's|@version[@]|$(PACKAGE_VERSION)|g' \
	-e 's|@package[@]|$(PACKAGE_NAME)|g' \
	-e 's|@localstatedir[@]|$(localstatedir)|g' \
	-e 's|@prefix[@]|$(prefix)|g' \
	-e 's|@sysconfdir[@]|$(sysconfdir)|g'

Lubos Slovak's avatar
Lubos Slovak committed
8
knot.sample.conf: Makefile
9 10 11 12 13 14
	rm -f $@ $@.tmp
	srcdir=''; \
	  test -f ./$@.in || srcdir=$(srcdir)/; \
	  $(edit) $${srcdir}$@.in >$@.tmp
	mv $@.tmp $@

Lubos Slovak's avatar
Lubos Slovak committed
15
knot.sample.conf: knot.sample.conf.in
16

Lubos Slovak's avatar
Lubos Slovak committed
17
install-data-local: knot.sample.conf
18 19
	[ -d $(sysconfdir) ] || \
	  $(INSTALL_DATA) -d $(sysconfdir)
Lubos Slovak's avatar
Lubos Slovak committed
20 21
	[ -f $(sysconfdir)/knot.sample.conf ] || \
	  $(INSTALL_DATA) knot.sample.conf example.com.zone $(sysconfdir)
22

23
clean-local:
Lubos Slovak's avatar
Lubos Slovak committed
24
	rm -f knot.sample.conf