4 # Build the Java files.
6 msgjava="/* DO NOT EDIT: automatically built by dist/s_java_const. */"
11 trap 'rm -f $t; exit 0' 0 1 2 3 13 15
15 echo 'package com.sleepycat.db.internal;' &&
17 echo 'public interface DbConstants' &&
19 for i in `egrep '^DB_.*J [C|\*]$' pubdef.in | awk '{print $1}'`; do \
20 sed -e ':a' -e '/\\$/N;s/\\\n[ ]*/ /;ta' \
21 ../dbinc_auto/api_flags.in ../dbinc/db.in | \
22 egrep -w "^#define[ ]$i|^[ ][ ]*$i" ;
24 sed -e "s/@DB_VERSION_MAJOR@/$DB_VERSION_MAJOR/" \
25 -e "s/@DB_VERSION_MINOR@/$DB_VERSION_MINOR/" \
26 -e "s/@DB_VERSION_PATCH@/$DB_VERSION_PATCH/" \
27 -e 's/^#define[ ][ ]*//' \
34 awk '{ print " int " $0 ";" }' &&
37 echo '// end of DbConstants.java') > $t
39 f=../java/src/com/sleepycat/db/internal/DbConstants.java
40 cmp $t $f > /dev/null 2>&1 ||
41 (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)