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

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

pkglibexec_SCRIPTS = b10-cmdctl

7
b10_cmdctldir = $(DESTDIR)$(pkgdatadir)
8
9
10
11
12

# 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
13
14
15
16
CMDCTL_CONFIGURATIONS = cmdctl-accounts.csv
CMDCTL_CONFIGURATIONS += cmdctl-keyfile.pem cmdctl-certfile.pem

b10_cmdctl_DATA = $(CMDCTL_CONFIGURATIONS)
17
18
b10_cmdctl_DATA += cmdctl.spec
 
19
EXTRA_DIST = $(CMDCTL_CONFIGURATIONS)
20

Likun Zhang's avatar
   
Likun Zhang committed
21
CLEANFILES=	b10-cmdctl cmdctl.pyc cmdctl.spec
22

23
24
25
man_MANS = b10-cmdctl.8
EXTRA_DIST += $(man_MANS) b10-cmdctl.xml

26
27
if ENABLE_MAN

28
29
30
b10-cmdctl.8: b10-cmdctl.xml
	xsltproc --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-cmdctl.xml

31
32
endif

Likun Zhang's avatar
   
Likun Zhang committed
33
34
35
cmdctl.spec: cmdctl.spec.pre
	$(SED) -e "s|@@SYSCONFDIR@@|$(sysconfdir)|" cmdctl.spec.pre >$@

36
37
# TODO: does this need $$(DESTDIR) also?
# this is done here since configure.ac AC_OUTPUT doesn't expand exec_prefix
38
39
b10-cmdctl: cmdctl.py
	$(SED) "s|@@PYTHONPATH@@|@pyexecdir@|" cmdctl.py >$@
40
	chmod a+x $@
41

42
if INSTALL_CONFIGURATIONS
43

Jeremy C. Reed's avatar
Jeremy C. Reed committed
44
# TODO: permissions handled later
45
46
install-data-local:
	$(mkinstalldirs) $(DESTDIR)/@sysconfdir@/@PACKAGE@   
Jeremy C. Reed's avatar
Jeremy C. Reed committed
47
48
49
50
51
	for f in $(CMDCTL_CONFIGURATIONS) ; do	\
	  if test ! -f $(DESTDIR)$(sysconfdir)/@PACKAGE@/$$f; then	\
	    $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(sysconfdir)/@PACKAGE@/ ;	\
	  fi ;	\
	done
52

53
endif