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

11
knot.sample.conf: knot.sample.conf.in
12 13 14 15 16 17
	rm -f $@ $@.tmp
	srcdir=''; \
	  test -f ./$@.in || srcdir=$(srcdir)/; \
	  $(edit) $${srcdir}$@.in >$@.tmp
	mv $@.tmp $@

18
EXTRA_DIST = knot.sample.conf.in example.com.zone
19

20 21
if HAVE_DAEMON

Lubos Slovak's avatar
Lubos Slovak committed
22
install-data-local: knot.sample.conf
23 24 25 26
	if [ \! -f $(DESTDIR)/$(config_dir)/knot.sample.conf ]; then \
	  $(INSTALL) -d $(DESTDIR)/$(config_dir); \
	  $(INSTALL_DATA) knot.sample.conf $(srcdir)/example.com.zone $(DESTDIR)/$(config_dir); \
	fi
27
uninstall-local:
28
	-rm -rf $(DESTDIR)/$(config_dir)/knot.sample.conf \
29
	        $(DESTDIR)/$(config_dir)/example.com.zone
30

31 32
endif # HAVE_DAEMON

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