#!/bin/sh -
#	$Id: s_win32_inc,v 1.1 2005/09/20 20:05:41 gmf Exp $
#
# Build Windows/32 include files.

msgc="/* DO NOT EDIT: automatically built by dist/s_win32_inc. */"
msgw="; DO NOT EDIT: automatically built by dist/s_win32_inc."

. RELEASE

s=/tmp/__db_a$$
t=/tmp/__db_b$$
rm -f $s $t

trap 'rm -f $s $t ; exit 1' 1 2 3 13 15

f=../build_win32/dbxml_config.h
(echo "$msgc" && sed "s/__EDIT_DBXML_VERSION__/$DBXML_VERSION/" win_config.in) > $t
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

# f=../build_win32/libdb.rc
# cat <<ENDOFSEDTEXT > $s
# s/%MAJOR%/$DBXML_VERSION_MAJOR/
# s/%MINOR%/$DBXML_VERSION_MINOR/
# s/%PATCH%/$DBXML_VERSION_PATCH/
# ENDOFSEDTEXT
# sed -f $s ../build_win32/libdbrc.src > $t
# cmp $t $f > /dev/null 2>&1 ||
#     (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
# 
# f=../build_win32/libdb.def
# (echo $msgw &&
#  echo &&
#  echo \
#  "DESCRIPTION	'Berkeley DB $DBXML_VERSION_MAJOR.$DBXML_VERSION_MINOR Library'" &&
#  echo &&
#  echo EXPORTS;
# a=1
# for i in `sed -e '/^$/d' -e '/^#/d' win_exports.in`; do
# 	echo "	$i	@$a"
# 	a=`expr $a + 1`
# done) > $t
# cmp $t $f > /dev/null 2>&1 ||
#     (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

rm -f $s $t