summaryrefslogtreecommitdiff
path: root/db-4.8.30/dist/s_message
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2016-12-17 21:28:53 -0800
committerJesse Morgan <jesse@jesterpm.net>2016-12-17 21:28:53 -0800
commit54df2afaa61c6a03cbb4a33c9b90fa572b6d07b8 (patch)
tree18147b92b969d25ffbe61935fb63035cac820dd0 /db-4.8.30/dist/s_message
Berkeley DB 4.8 with rust build script for linux.
Diffstat (limited to 'db-4.8.30/dist/s_message')
-rwxr-xr-xdb-4.8.30/dist/s_message31
1 files changed, 31 insertions, 0 deletions
diff --git a/db-4.8.30/dist/s_message b/db-4.8.30/dist/s_message
new file mode 100755
index 0000000..19e621a
--- /dev/null
+++ b/db-4.8.30/dist/s_message
@@ -0,0 +1,31 @@
+#!/bin/sh -
+# $Id$
+#
+# Build the automatically generated rep & repmgr message files.
+
+header=/tmp/__db_a
+source=/tmp/__db_b
+
+trap 'rm -f /tmp/__db_[ab]; exit 1' 1 2 3 13 15
+trap 'rm -f /tmp/__db_[ab]; exit 0' 0
+
+DIR="rep repmgr"
+
+# Build DB's message marshaling/unmarshaling routines.
+for i in $DIR; do
+ for f in ../$i/*.src; do
+ subsystem=`basename $f .src`
+ awk -f gen_msg.awk \
+ -v header_file=$header \
+ -v source_file=$source < $f
+
+ f=../dbinc_auto/${subsystem}_auto.h
+ cmp $header $f > /dev/null 2>&1 ||
+ (echo "Building $f" &&
+ rm -f $f && cp $header $f && chmod 444 $f)
+ f=../$i/${subsystem}_auto.c
+ cmp $source $f > /dev/null 2>&1 ||
+ (echo "Building $f" &&
+ rm -f $f && cp $source $f && chmod 444 $f)
+ done
+done