BIND 10 trac1101, updated. 68cf1ccf20ecfcc1e06de69fcd50d13cf8b5e1e0 [1101] updated README so that it matches the latest implementation.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Sep 22 16:54:19 UTC 2011


The branch, trac1101 has been updated
       via  68cf1ccf20ecfcc1e06de69fcd50d13cf8b5e1e0 (commit)
       via  bd0c874dda60a0f5e235b653e1bb63716cb385f8 (commit)
       via  b6709a7001e4812c4ed774ef0ff3111fb654d199 (commit)
      from  715fee7daf2f966261d997e1b39888f14fb28a45 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 68cf1ccf20ecfcc1e06de69fcd50d13cf8b5e1e0
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Sep 22 09:52:56 2011 -0700

    [1101] updated README so that it matches the latest implementation.

commit bd0c874dda60a0f5e235b653e1bb63716cb385f8
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Sep 22 09:51:11 2011 -0700

    [1101] cleanup: remove unnecessary variable from configure.ac

commit b6709a7001e4812c4ed774ef0ff3111fb654d199
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Sep 22 09:50:11 2011 -0700

    [1101] added a helper shell script to generate dummy python scripts.

-----------------------------------------------------------------------

Summary of changes:
 configure.ac                                     |    4 +--
 src/lib/python/isc/log_messages/README           |   43 +++++++++-------------
 src/lib/python/isc/log_messages/gen-forwarder.sh |   14 +++++++
 3 files changed, 32 insertions(+), 29 deletions(-)
 create mode 100755 src/lib/python/isc/log_messages/gen-forwarder.sh

-----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 300c48d..ee5d79b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,12 +155,10 @@ fi
 PYTHON_SITEPKG_DIR=${pyexecdir}
 AC_SUBST(PYTHON_SITEPKG_DIR)
 
-# These will be commonly used in various Makefile.am's that need to generate
+# This will be commonly used in various Makefile.am's that need to generate
 # python log messages.
 PYTHON_LOGMSGPKG_DIR="\$(top_builddir)/src/lib/python/isc/log_messages"
 AC_SUBST(PYTHON_LOGMSGPKG_DIR)
-PYTHON_LOGMSGPKG_SRCDIR="\$(top_srcdir)/src/lib/python/isc/log_messages"
-AC_SUBST(PYTHON_LOGMSGPKG_SRCDIR)
 
 # This is python package paths commonly used in python tests.  See
 # README of log_messages for why it's included.
diff --git a/src/lib/python/isc/log_messages/README b/src/lib/python/isc/log_messages/README
index ebb3337..c96f78c 100644
--- a/src/lib/python/isc/log_messages/README
+++ b/src/lib/python/isc/log_messages/README
@@ -24,36 +24,34 @@ which ensures the right directory is chosen.
 A python module or program that defines its own log messages needs to
 make sure that the setup described above is implemented.  It's a
 complicated process, but can generally be done by following a common
-pattern.  The following are a sample snippet for Makefile.in for a
-module named "mymodule" (which is supposed to be generated from a file
-"mymodule_messages.mes").  In many cases it should work simply by
-replacing 'mymodule' with the actual module name.
+pattern:
+
+1. Create the dummy script (see above) for the module and update
+   Makefile.am in this directory accordingly.  See (and use)
+   a helper shell script named gen-forwarder.sh.
+2. Update Makefil.am of the module that defines the log message.  The
+   following are a sample snippet for Makefile.am for a module named
+   "mymodule" (which is supposed to be generated from a file
+   "mymodule_messages.mes").  In many cases it should work simply by
+   replacing 'mymodule' with the actual module name.
 
 ====================  begin Makefile.am additions ===================
-nodist_pylogmessage_PYTHON = $(PYTHON_LOGMSGPKG_DIR)/mymodule_messages.py
+nodist_pylogmessage_PYTHON = $(PYTHON_LOGMSGPKG_DIR)/work/mymodule_messages.py
 pylogmessagedir = $(pyexecdir)/isc/log_messages/
 
-CLEANFILES = $(PYTHON_LOGMSGPKG_DIR)/mymodule_messages.py
-CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/mymodule_messages.pyc
+CLEANFILES = $(PYTHON_LOGMSGPKG_DIR)/work/mymodule_messages.py
+CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/work/mymodule_messages.pyc
 
 EXTRA_DIST = mymodule_messages.mes
 
-BUILT_SOURCES = $(PYTHON_LOGMSGPKG_DIR)/mymodule_messages.py
-CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/mymodule_messages.py
-CLEANFILES += $(PYTHON_LOGMSGPKG_DIR)/mymodule_messages.pyc
-EXTRA_DIST += $(PYTHON_LOGMSGPKG_SRCDIR)/mymodule_messages.py
-
-$(PYTHON_LOGMSGPKG_DIR)/mymodule_messages.py : mymodule_messages.mes
+$(PYTHON_LOGMSGPKG_DIR)/work/mymodule_messages.py : mymodule_messages.mes
 	$(top_builddir)/src/lib/log/compiler/message \
-	-d $(PYTHON_LOGMSGPKG_DIR) -p $(srcdir)/mymodule_messages.mes
-
-$(PYTHON_LOGMSGPKG_DIR)/mymodule_messages.py: Makefile
-	echo "from work.mymodule_messages import *" > $@
+	-d $(PYTHON_LOGMSGPKG_DIR)/work -p $(srcdir)/mymodule_messages.mes
 
 # This rule ensures mymodule_messages.py is (re)generated as a result of
 # 'make'.  If there's no other appropriate target, specify
 # mymodule_messages.py in BUILT_SOURCES.
-mymodule: <other source files> $(PYTHON_LOGMSGPKG_DIR)/mymodule_messages.py
+mymodule: <other source files> $(PYTHON_LOGMSGPKG_DIR)/work/mymodule_messages.py
 =====================  end Makefile.am additions ====================
 
 Notes:
@@ -67,11 +65,4 @@ Notes:
   used for other scripts in the same Makefile.am file.
 - $(PYTHON_LOGMSGPKG_DIR) should be set to point to this directory (or
   the corresponding build directory if it's different) by the
-  configure script.  $(PYTHON_LOGMSGPKG_SRCDIR) should be set to point
-  to this directory by the configure script.
-- The four lines starting from BUILT_SOURCES and the second make rule
-  are for preparing the dummy python file under the source tree.
-  Note that EXTRA_DIST is specified so that the python script is
-  placed in the source tree (not only in the build tree when these
-  two are different).  If you don't like this trick, you could
-  directly add the file in this directory alternatively.
+  configure script.
diff --git a/src/lib/python/isc/log_messages/gen-forwarder.sh b/src/lib/python/isc/log_messages/gen-forwarder.sh
new file mode 100755
index 0000000..84c2450
--- /dev/null
+++ b/src/lib/python/isc/log_messages/gen-forwarder.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+MODULE_NAME=$1
+if test -z $MODULE_NAME; then
+	echo 'Usage: gen-forwarder.sh module_name'
+	exit 1
+fi
+
+echo "from work.${MODULE_NAME}_messages import *" > ${MODULE_NAME}_messages.py
+echo "Forwarder python script is generated.  Make sure to perform:"
+echo "git add ${MODULE_NAME}_messages.py"
+echo "and add the following to Makefile.am:"
+echo "EXTRA_DIST += ${MODULE_NAME}_messages.py"
+echo "CLEANFILES += ${MODULE_NAME}_messages.pyc"




More information about the bind10-changes mailing list