summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2008-06-21 12:35:59 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2008-06-21 12:35:59 +0200
commitd3233ed6f0047a0bc0fa0f81aee7184a8d274dc3 (patch)
tree652db27df8ae85d915a6cda975c84f82b5561fdb
parent9ff8cae05b332d1629761c54187a66d386b744c6 (diff)
Make sure nbb and nbb_lib fit together
-rw-r--r--nbb/Makefile-files3
-rw-r--r--nbb/nbb.in1
-rw-r--r--nbb/nbb_lib.in4
3 files changed, 7 insertions, 1 deletions
diff --git a/nbb/Makefile-files b/nbb/Makefile-files
index ac12ab1..d9356c1 100644
--- a/nbb/Makefile-files
+++ b/nbb/Makefile-files
@@ -8,9 +8,10 @@ bin_SCRIPTS += nbb/nbb
EXTRA_DIST += nbb/nbb.in
CLEANFILES += nbb/nbb
-nbb/nbb: $(srcdir)/nbb/nbb.in nbb/nbb_lib.py
+nbb/nbb: $(srcdir)/nbb/nbb.in nbb/nbb_lib.py Makefile
$(SED) -e "s|[@]PYTHON@|$(PYTHON)|" \
-e "s|[@]pythondir@|$(pythondir)|" \
+ -e "s|[@]PACKAGE_VERSION@|$(PACKAGE_VERSION)|" \
< $(srcdir)/nbb/nbb.in > nbb/nbb
chmod +x nbb/nbb
diff --git a/nbb/nbb.in b/nbb/nbb.in
index 497f9ad..92d1b3c 100644
--- a/nbb/nbb.in
+++ b/nbb/nbb.in
@@ -26,6 +26,7 @@ if __name__ == '__main__':
sys.exit(3)
#sys.stdout.write("sys.path=%s\n" % repr(sys.path))
#sys.stdout.flush()
+ assert(nbb_lib.version == "@PACKAGE_VERSION@")
nbb_lib.main(sys.argv)
# vim: syntax=python
diff --git a/nbb/nbb_lib.in b/nbb/nbb_lib.in
index 3a828cd..05d73eb 100644
--- a/nbb/nbb_lib.in
+++ b/nbb/nbb_lib.in
@@ -77,6 +77,10 @@ import subprocess
import urlparse
+# Used to make sure nbb_lib and nbb fit together
+version = "@PACKAGE_VERSION@"
+
+
########################################################################
# Utility functions
########################################################################