diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2016-12-17 21:28:53 -0800 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2016-12-17 21:28:53 -0800 |
commit | 54df2afaa61c6a03cbb4a33c9b90fa572b6d07b8 (patch) | |
tree | 18147b92b969d25ffbe61935fb63035cac820dd0 /db-4.8.30/dist/s_java_const |
Berkeley DB 4.8 with rust build script for linux.
Diffstat (limited to 'db-4.8.30/dist/s_java_const')
-rwxr-xr-x | db-4.8.30/dist/s_java_const | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/db-4.8.30/dist/s_java_const b/db-4.8.30/dist/s_java_const new file mode 100755 index 0000000..94eac9a --- /dev/null +++ b/db-4.8.30/dist/s_java_const @@ -0,0 +1,41 @@ +#!/bin/sh - +# $Id$ +# +# Build the Java files. + +msgjava="/* DO NOT EDIT: automatically built by dist/s_java_const. */" + +. ./RELEASE + +t=/tmp/__java +trap 'rm -f $t; exit 0' 0 1 2 3 13 15 + +(echo "$msgjava" && + echo && + echo 'package com.sleepycat.db.internal;' && + echo && + echo 'public interface DbConstants' && + echo '{' && + for i in `egrep '^DB_.*J [C|\*]$' pubdef.in | awk '{print $1}'`; do \ + sed -e ':a' -e '/\\$/N;s/\\\n[ ]*/ /;ta' \ + ../dbinc_auto/api_flags.in ../dbinc/db.in | \ + egrep -w "^#define[ ]$i|^[ ][ ]*$i" ; + done | + sed -e "s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/" \ + -e "s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/" \ + -e "s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/" \ + -e 's/^#define[ ][ ]*//' \ + -e 's/[()=,]/ /g' \ + -e 's/\/\*.*$//' \ + -e 's/^[ ]*//' \ + -e 's/[ ]*$//g' \ + -e 's/[ ][ ]*/ /g' \ + -e 's/ / = /' | \ + awk '{ print " int " $0 ";" }' && + echo '}' && + echo && + echo '// end of DbConstants.java') > $t + +f=../java/src/com/sleepycat/db/internal/DbConstants.java +cmp $t $f > /dev/null 2>&1 || + (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f) |