Makefile.am 2 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SUBDIRS = . tests

pkglibexecdir = $(libexecdir)/@PACKAGE@

pkglibexec_SCRIPTS = b10-memmgr

b10_memmgrdir = $(pkgdatadir)
b10_memmgr_DATA = memmgr.spec

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

CLEANFILES = b10-memmgr memmgr.pyc
CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/memmgr_messages.py
CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/memmgr_messages.pyc
16
CLEANFILES += memmgr.spec
17

18
EXTRA_DIST =  memmgr_messages.mes
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

man_MANS = b10-memmgr.8
DISTCLEANFILES = $(man_MANS)
EXTRA_DIST += $(man_MANS) b10-memmgr.xml

if GENERATE_DOCS

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

else

$(man_MANS):
	@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 > $@

endif

# Define rule to build logging source files from message file
$(PYTHON_LOGMSGPKG_DIR)/work/memmgr_messages.py : memmgr_messages.mes
	$(top_builddir)/src/lib/log/compiler/message \
	-d $(PYTHON_LOGMSGPKG_DIR)/work -p $(srcdir)/memmgr_messages.mes

42
43
44
memmgr.spec: memmgr.spec.pre
	$(SED) -e "s|@@LOCALSTATEDIR@@|$(localstatedir)|" memmgr.spec.pre > $@

45
46
47
48
49
50
51
# this is done here since configure.ac AC_OUTPUT doesn't expand exec_prefix
b10-memmgr: memmgr.py $(PYTHON_LOGMSGPKG_DIR)/work/memmgr_messages.py
	$(SED) -e "s|@@PYTHONPATH@@|@pyexecdir@|" memmgr.py >$@
	chmod a+x $@

CLEANDIRS = __pycache__

52
53
54
55
56
57
58
59
60
# install the default directory for memory-mapped files.  Note that the
# path must be identical to the default value in memmgr.spec.  We'll make
# it readable only for the owner to minimize the risk of accidents.
install-data-local:
	$(mkinstalldirs) $(DESTDIR)@localstatedir@/@PACKAGE@/mapped_files

install-data-hook:
	-chmod 700 $(DESTDIR)@localstatedir@/@PACKAGE@/mapped_files

61
62
clean-local:
	rm -rf $(CLEANDIRS)