summaryrefslogtreecommitdiff
path: root/samples/Makefile.am
blob: 5ac505b56afd6446ddac9776557b059fa5db0871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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'

knot.sample.conf: Makefile
	rm -f $@ $@.tmp
	srcdir=''; \
	  test -f ./$@.in || srcdir=$(srcdir)/; \
	  $(edit) $${srcdir}$@.in >$@.tmp
	mv $@.tmp $@

knot.sample.conf: knot.sample.conf.in

install-data-local: knot.sample.conf
	[ -d $(sysconfdir) ] || \
	  $(INSTALL) -d $(sysconfdir)
	[ -f $(sysconfdir)/knot.sample.conf ] || \
	  $(INSTALL_DATA) knot.sample.conf example.com.zone $(sysconfdir)

clean-local:
	rm -f knot.sample.conf