Makefile.am 1.45 KB
Newer Older
1 2 3 4 5 6 7
SUBDIRS = . tests

EXTRA_DIST =

if KEA_SHELL

# Kea-shell is enabled, here are proper rules for it.
8
kea_shell_PYTHON = kea-shell.py kea_conn.py kea_connector2.py kea_connector3.py kea_params.py
9
kea_shelldir = @localstatedir@/@PACKAGE@
Tomek Mrugalski's avatar
Tomek Mrugalski committed
10 11

bin_SCRIPTS = kea-shell
12 13 14 15

else

# Kea-shell is disabled, simply keep the files for make dist
Tomek Mrugalski's avatar
Tomek Mrugalski committed
16
EXTRA_DIST += kea-shell.py kea_conn.py kea_connector2.py kea_connector3.py kea_params.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

endif

CLEANFILES = kea-shell kea-shell.pyc


man_MANS = kea-shell.8
DISTCLEANFILES = $(man_MANS)
EXTRA_DIST += $(man_MANS) kea-shell.xml

if GENERATE_DOCS
kea-shell.8: kea-shell.xml
	@XSLTPROC@ --novalid --xinclude --nonet -o $@ \
        http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl \
	$(srcdir)/kea-shell.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 Kea > $@

endif

Tomek Mrugalski's avatar
Tomek Mrugalski committed
41
# This is done here since configure.ac AC_OUTPUT doesn't expand certain variables.
42
kea-shell: kea-shell.py
43 44
	$(SED) "s|@@PYTHONPATH@@|@pyexecdir@|" kea-shell.py > kea-shell.tmp
	$(SED) "s|REPORTED_VERSION|@PACKAGE_VERSION@|" kea-shell.tmp >$@
45
	rm -f kea-shell.tmp
46 47 48 49 50 51 52 53 54 55 56 57
	chmod a+x $@

install-data-local:
	$(mkinstalldirs) $(DESTDIR)/@localstatedir@/@PACKAGE@

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

CLEANDIRS = __pycache__

clean-local:
	rm -rf $(CLEANDIRS)