Makefile.am 2.31 KB
Newer Older
1
SUBDIRS = . tests
Jeremy C. Reed's avatar
Jeremy C. Reed committed
2

3 4 5
pkglibexecdir = $(libexecdir)/@PACKAGE@

pkglibexec_SCRIPTS = b10-cmdctl
6 7 8

nodist_pylogmessage_PYTHON = $(PYTHON_LOGMSGPKG_DIR)/work/cmdctl_messages.py
pylogmessagedir = $(pyexecdir)/isc/log_messages/
9

10
b10_cmdctldir = $(pkgdatadir)
11 12 13 14 15

# NOTE: this will overwrite on install
# So these generic copies are placed in share/bind10 instead of to etc
# Admin or packageer will need to put into place manually.

Jeremy C. Reed's avatar
Jeremy C. Reed committed
16 17 18 19
CMDCTL_CONFIGURATIONS = cmdctl-accounts.csv
CMDCTL_CONFIGURATIONS += cmdctl-keyfile.pem cmdctl-certfile.pem

b10_cmdctl_DATA = $(CMDCTL_CONFIGURATIONS)
20
b10_cmdctl_DATA += cmdctl.spec
21

22
EXTRA_DIST = $(CMDCTL_CONFIGURATIONS)
23

24 25 26 27
CLEANFILES= b10-cmdctl cmdctl.pyc cmdctl.spec
CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/cmdctl_messages.py
CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/cmdctl_messages.pyc

28
man_MANS = b10-cmdctl.8
29
DISTCLEANFILES = $(man_MANS)
30
EXTRA_DIST += $(man_MANS) b10-cmdctl.xml cmdctl_messages.mes
31

32
if GENERATE_DOCS
33

34
b10-cmdctl.8: b10-cmdctl.xml
35
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-cmdctl.xml
36

37 38 39
else

$(man_MANS):
40 41
	@echo Man generation disabled.  Creating dummy $@.  Configure with --enable-generate-docs to enable it.
	@echo Man generation disabled.  Remove this file, configure with --enable-generate-docs, and rebuild BIND 10 > $@
42

43 44
endif

Likun Zhang's avatar
 
Likun Zhang committed
45 46 47
cmdctl.spec: cmdctl.spec.pre
	$(SED) -e "s|@@SYSCONFDIR@@|$(sysconfdir)|" cmdctl.spec.pre >$@

48 49 50 51
$(PYTHON_LOGMSGPKG_DIR)/work/cmdctl_messages.py : cmdctl_messages.mes
	$(top_builddir)/src/lib/log/compiler/message \
	-d $(PYTHON_LOGMSGPKG_DIR)/work -p $(srcdir)/cmdctl_messages.mes

52
# this is done here since configure.ac AC_OUTPUT doesn't expand exec_prefix
53
b10-cmdctl: cmdctl.py $(PYTHON_LOGMSGPKG_DIR)/work/cmdctl_messages.py
54
	$(SED) "s|@@PYTHONPATH@@|@pyexecdir@|" cmdctl.py >$@
55
	chmod a+x $@
56

57
if INSTALL_CONFIGURATIONS
58

59 60
# Below we intentionally use ${INSTALL} -m 640 instead of $(INSTALL_DATA)
# because these file will contain sensitive information.
61 62
install-data-local:
	$(mkinstalldirs) $(DESTDIR)/@sysconfdir@/@PACKAGE@   
Jeremy C. Reed's avatar
Jeremy C. Reed committed
63 64
	for f in $(CMDCTL_CONFIGURATIONS) ; do	\
	  if test ! -f $(DESTDIR)$(sysconfdir)/@PACKAGE@/$$f; then	\
65
	    ${INSTALL} -m 640 $(srcdir)/$$f $(DESTDIR)$(sysconfdir)/@PACKAGE@/ ;	\
Jeremy C. Reed's avatar
Jeremy C. Reed committed
66 67
	  fi ;	\
	done
68

69
endif
70 71 72 73 74

CLEANDIRS = __pycache__

clean-local:
	rm -rf $(CLEANDIRS)