Makefile.am 1.36 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
EXTRA_DIST += cmdctl.spec
21

22
CLEANFILES=	b10-cmdctl cmdctl.pyc
23

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

27
28
if ENABLE_MAN

29
30
31
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

32
33
endif

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

40
if INSTALL_CONFIGURATIONS
41

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

51
endif