]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1190] Generate the msgq message file
authorMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 18 Dec 2012 11:11:23 +0000 (12:11 +0100)
committerMichal 'vorner' Vaner <michal.vaner@nic.cz>
Tue, 18 Dec 2012 11:11:23 +0000 (12:11 +0100)
It is empty now, just updating the build system - yes, we really do need
2 new files and 2 makefiles to generate one message file :-|.

src/bin/msgq/Makefile.am
src/bin/msgq/msgq.py.in
src/bin/msgq/msgq_messages.mes [new file with mode: 0644]
src/lib/python/isc/log_messages/Makefile.am
src/lib/python/isc/log_messages/msgq_messages.py [new file with mode: 0644]

index 4244d07c426da636d6d770eb0ef8349ed4f32495..5f377b1eef8d6a33a183b15b74ac2319e7b26f7d 100644 (file)
@@ -5,10 +5,16 @@ pkglibexecdir = $(libexecdir)/@PACKAGE@
 pkglibexec_SCRIPTS = b10-msgq
 
 CLEANFILES = b10-msgq msgq.pyc
+CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/msgq_messages.py
+CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/msgq_messages.pyc
 
 man_MANS = b10-msgq.8
 DISTCLEANFILES = $(man_MANS)
-EXTRA_DIST = $(man_MANS) msgq.xml
+EXTRA_DIST = $(man_MANS) msgq.xml msgq_messages.mes
+
+nodist_pylogmessage_PYTHON = $(PYTHON_LOGMSGPKG_DIR)/work/msgq_messages.py
+pylogmessagedir = $(pyexecdir)/isc/log_messages/
+BUILT_SOURCES = $(PYTHON_LOGMSGPKG_DIR)/work/msgq_messages.py
 
 if GENERATE_DOCS
 
@@ -23,6 +29,11 @@ $(man_MANS):
 
 endif
 
+# Define rule to build logging source files from message file
+$(PYTHON_LOGMSGPKG_DIR)/work/msgq_messages.py : msgq_messages.mes
+       $(top_builddir)/src/lib/log/compiler/message \
+       -d $(PYTHON_LOGMSGPKG_DIR)/work -p $(srcdir)/msgq_messages.mes
+
 # this is done here since configure.ac AC_OUTPUT doesn't expand exec_prefix
 b10-msgq: msgq.py
        $(SED) "s|@@PYTHONPATH@@|@pyexecdir@|" msgq.py >$@
index fda1b2371a01b7dcb5f4a9505263cb336764d615..71b8d284141e5998184dec7f189f8e37e3824f38 100755 (executable)
@@ -32,6 +32,7 @@ import random
 from optparse import OptionParser, OptionValueError
 import isc.util.process
 import isc.log
+from isc.log_messages.msgq_messages import *
 
 import isc.cc
 
diff --git a/src/bin/msgq/msgq_messages.mes b/src/bin/msgq/msgq_messages.mes
new file mode 100644 (file)
index 0000000..e69de29
index 6d23df3b5d3b7806800bce28ba6f9be1d8792e6e..e0310465d4cd7cc00da556961118b658fcdc3423 100644 (file)
@@ -16,6 +16,7 @@ EXTRA_DIST += libddns_messages.py
 EXTRA_DIST += libxfrin_messages.py
 EXTRA_DIST += server_common_messages.py
 EXTRA_DIST += dbutil_messages.py
+EXTRA_DIST += msgq_messages.py
 
 CLEANFILES = __init__.pyc
 CLEANFILES += bind10_messages.pyc
@@ -33,6 +34,7 @@ CLEANFILES += libddns_messages.pyc
 CLEANFILES += libxfrin_messages.pyc
 CLEANFILES += server_common_messages.pyc
 CLEANFILES += dbutil_messages.pyc
+CLEANFILES += msgq_messages.pyc
 
 CLEANDIRS = __pycache__
 
diff --git a/src/lib/python/isc/log_messages/msgq_messages.py b/src/lib/python/isc/log_messages/msgq_messages.py
new file mode 100644 (file)
index 0000000..81efa41
--- /dev/null
@@ -0,0 +1 @@
+from work.msgq_messages import *