Makefile.am 2.49 KB
Newer Older
1 2 3 4
SUBDIRS = tests

pkglibexecdir = $(libexecdir)/@PACKAGE@

Naoki Kambe's avatar
Naoki Kambe committed
5
pkglibexec_SCRIPTS = b10-stats b10-stats-httpd
6

7
b10_statsdir = $(pkgdatadir)
8
b10_stats_DATA = stats.spec stats-httpd.spec
Naoki Kambe's avatar
Naoki Kambe committed
9
b10_stats_DATA += stats-httpd-xml.tpl stats-httpd-xsd.tpl stats-httpd-xsl.tpl
10 11 12 13

nodist_pylogmessage_PYTHON = $(PYTHON_LOGMSGPKG_DIR)/work/stats_messages.py
nodist_pylogmessage_PYTHON += $(PYTHON_LOGMSGPKG_DIR)/work/stats_httpd_messages.py
pylogmessagedir = $(pyexecdir)/isc/log_messages/
14

Naoki Kambe's avatar
Naoki Kambe committed
15 16
CLEANFILES = b10-stats stats.pyc
CLEANFILES += b10-stats-httpd stats_httpd.pyc
17 18 19 20
CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/stats_messages.py
CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/stats_messages.pyc
CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/stats_httpd_messages.py
CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/stats_httpd_messages.pyc
21

Naoki Kambe's avatar
Naoki Kambe committed
22
man_MANS = b10-stats.8 b10-stats-httpd.8
23
DISTCLEANFILES = $(man_MANS)
Naoki Kambe's avatar
Naoki Kambe committed
24
EXTRA_DIST = $(man_MANS) b10-stats.xml b10-stats-httpd.xml
25
EXTRA_DIST += stats.spec stats-httpd.spec
Naoki Kambe's avatar
Naoki Kambe committed
26
EXTRA_DIST += stats-httpd-xml.tpl stats-httpd-xsd.tpl stats-httpd-xsl.tpl
27
EXTRA_DIST += stats_messages.mes stats_httpd_messages.mes
28

29
if GENERATE_DOCS
30 31

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

Naoki Kambe's avatar
Naoki Kambe committed
34
b10-stats-httpd.8: b10-stats-httpd.xml
35
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $(srcdir)/b10-stats-httpd.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

Naoki Kambe's avatar
Naoki Kambe committed
43
endif
44

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

$(PYTHON_LOGMSGPKG_DIR)/work/stats_httpd_messages.py : stats_httpd_messages.mes
	$(top_builddir)/src/lib/log/compiler/message \
	-d $(PYTHON_LOGMSGPKG_DIR)/work -p $(srcdir)/stats_httpd_messages.mes
52

53
# this is done here since configure.ac AC_OUTPUT doesn't expand exec_prefix
54
b10-stats: stats.py $(PYTHON_LOGMSGPKG_DIR)/work/stats_messages.py
Naoki Kambe's avatar
Naoki Kambe committed
55
	$(SED) -e "s|@@PYTHONPATH@@|@pyexecdir@|"  stats.py >$@
56 57
	chmod a+x $@

58
b10-stats-httpd: stats_httpd.py $(PYTHON_LOGMSGPKG_DIR)/work/stats_httpd_messages.py
Naoki Kambe's avatar
Naoki Kambe committed
59
	$(SED) -e "s|@@PYTHONPATH@@|@pyexecdir@|" stats_httpd.py >$@
60
	chmod a+x $@
61 62 63 64 65

CLEANDIRS = __pycache__

clean-local:
	rm -rf $(CLEANDIRS)