head	1.8;
access;
symbols
	rpm-4_4_8-release:1.4.2.3
	rpm-4_4_7-release:1.4.2.3
	db-4_5_20:1.8
	rpm-4_4_6-release:1.4.2.2
	rpm-4_4_5-release:1.4.2.2
	db-4_4_20:1.7
	rpm-4_4_4-release:1.4.2.2
	db-4_4_16:1.7
	rpm-4_4_3-release:1.4.2.1
	db-4_4_11:1.6
	db-4_3_29:1.4
	jbj_before_tklcpatches:1.4
	rpm-4_4_2-release:1.4
	pjones-sparse-experiment:1.5.0.2
	db-4_4_4:1.5
	rpm-4_4_1-release:1.4
	db-4_3_27:1.4
	rpm-4_4-release:1.4
	rpm-4_4:1.4.0.2
	db-4_3_21:1.4
	db-4_3_14:1.3
	db-4_2_52:1.2
	rpm-4_3_1-start:1.2
	rpm-4_3:1.2.0.2
	rpm-4_2_1-release:1.1.1.6
	rpm-4_1_1-release:1.1.1.6
	rpm-4_2-release:1.1.1.6
	rpm-4_2:1.1.1.6.0.2
	postmerge-db-4_1_24-release:1.1.1.6
	premerge-db-4_1_24-release:1.1.1.6
	db-4_1_24-release:1.1.1.6
	pre-db-4_1_24-release:1.1.1.5
	rpm-4_1-release:1.1.1.4
	postmerge-db-4_1_17:1.1.1.5
	premerge-db-4_1_17:1.1.1.5
	db-4_1_17:1.1.1.5
	pre-db-4_1_17:1.1.1.4
	rpm-4_1:1.1.1.4.0.2
	rpm-4_0_4-release:1.1.1.2.2.2
	jbj-before-beecrypt:1.1.1.2.2.2
	postmerge-db-4_0_14:1.1.1.4
	premerge-db-4_0_14:1.1.1.4
	db-4_0_14:1.1.1.4
	pre-db-4_0_14:1.1.1.4
	rpm-4_0_3-release:1.1.1.2.2.1
	postmerge-db-4_0_7:1.1.1.4
	premerge-db-4_0_7:1.1.1.4
	db-4_0_7:1.1.1.4
	pre-db-4_0_7:1.1.1.3
	jbj_b4_rollback:1.1.1.2.2.1
	postmerge-db-3_3_11-release:1.1.1.3
	premerge-db-3_3_11-release:1.1.1.3
	db-3_3_11-release:1.1.1.3
	pre-db-3_3_11-release:1.1.1.2
	rpm-4_0:1.1.1.2.0.2
	postmerge-db-3_3_4-release:1.1.1.2
	premerge-db-3_3_4-release:1.1.1.2
	db-3_3_4-release:1.1.1.2
	pre-db-3_3_4-release:1.1.1.1
	db-3_2_9-release:1.1.1.1
	db-3_2_9-vendor:1.1.1;
locks; strict;
comment	@# @;
expand	@o@;


1.8
date	2006.10.01.20.18.54;	author jbj;	state Exp;
branches;
next	1.7;

1.7
date	2005.11.19.18.31.38;	author jbj;	state Exp;
branches;
next	1.6;

1.6
date	2005.10.28.17.13.18;	author jbj;	state Exp;
branches;
next	1.5;

1.5
date	2005.02.21.15.53.58;	author jbj;	state Exp;
branches;
next	1.4;

1.4
date	2004.11.11.15.58.46;	author jbj;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2004.10.16.01.31.55;	author jbj;	state Exp;
branches;
next	1.2;

1.2
date	2003.12.15.21.42.42;	author jbj;	state Exp;
branches;
next	1.1;

1.1
date	2001.03.21.18.33.38;	author jbj;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2001.03.21.18.33.38;	author jbj;	state Exp;
branches;
next	1.1.1.2;

1.1.1.2
date	2001.05.13.19.58.27;	author jbj;	state Exp;
branches
	1.1.1.2.2.1;
next	1.1.1.3;

1.1.1.3
date	2001.07.23.20.09.05;	author jbj;	state Exp;
branches;
next	1.1.1.4;

1.1.1.4
date	2001.10.15.03.47.23;	author jbj;	state Exp;
branches;
next	1.1.1.5;

1.1.1.5
date	2002.08.14.16.31.56;	author jbj;	state Exp;
branches;
next	1.1.1.6;

1.1.1.6
date	2002.09.19.20.33.51;	author jbj;	state Exp;
branches;
next	;

1.1.1.2.2.1
date	2001.07.23.20.31.15;	author jbj;	state Exp;
branches;
next	1.1.1.2.2.2;

1.1.1.2.2.2
date	2002.01.08.04.07.17;	author jbj;	state Exp;
branches;
next	;

1.4.2.1
date	2005.10.28.18.44.32;	author jbj;	state Exp;
branches;
next	1.4.2.2;

1.4.2.2
date	2005.11.19.19.33.04;	author jbj;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	2006.10.01.22.29.21;	author jbj;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Update to db-4.5.20.
@
text
@#!/bin/sh -
#	$Id: s_vxworks,v 12.13 2006/09/13 16:57:49 bostic Exp $
#
# Build the VxWorks files.

msgc="/* DO NOT EDIT: automatically built by dist/s_vxworks. */"

. RELEASE

s=/tmp/__db_a
t=/tmp/__db_b
u=/tmp/__db_c
vxfilelist=/tmp/__db_d
vxsmallfiles=/tmp/__db_e

trap 'rm -f $s $t $u $vxfilelist $vxsmallfiles ; exit 0' 0
trap 'rm -f $s $t $u $vxfilelist $vxsmallfiles ; exit 1' 1 2 3 13 15

# Build the VxWorks automatically generated files.
cat <<ENDOFSEDTEXT > $s
/extern "C" {/{
n
n
i\\
\\
/* Tornado 2 does not provide a standard C pre-processor #define. */\\
#ifndef __vxworks\\
#define	__vxworks\\
#endif
}
/@@inttypes_h_decl@@/d
/@@stddef_h_decl@@/d
/@@stdint_h_decl@@/d
/@@unistd_h_decl@@/d
/@@thread_h_decl@@/d
s/@@u_int8_decl@@/typedef unsigned char u_int8_t;/
/@@int16_decl@@/d
s/@@u_int16_decl@@/typedef unsigned short u_int16_t;/
/@@int32_decl@@/d
s/@@u_int32_decl@@/typedef unsigned int u_int32_t;/
s/@@int64_decl@@//
s/@@u_int64_decl@@/typedef unsigned long long u_int64_t;/
/@@u_char_decl@@/d
/@@u_short_decl@@/d
/@@u_int_decl@@/d
/@@u_long_decl@@/d
/@@ssize_t_decl@@/d
s/@@uintmax_t_decl@@/typedef unsigned long uintmax_t;/
s/@@uintptr_t_decl@@/typedef unsigned long uintptr_t;/
s/@@db_seq_decl@@/typedef int db_seq_t;/
/@@pid_t_decl@@/d
s/@@db_threadid_t_decl@@/typedef uintmax_t db_threadid_t;/
s/@@DB_VERSION_MAJOR@@/$DB_VERSION_MAJOR/
s/@@DB_VERSION_MINOR@@/$DB_VERSION_MINOR/
s/@@DB_VERSION_PATCH@@/$DB_VERSION_PATCH/
s/@@DB_VERSION_STRING@@/"$DB_VERSION_STRING"/
s/@@DB_VERSION_UNIQUE_NAME@@//
s/@@DB_CONST@@//
s/@@DB_PROTO1@@/#undef __P/
s/@@DB_PROTO2@@/#define	__P(protos)	protos/
/@@platform_header@@/d
/@@platform_footer@@/d
ENDOFSEDTEXT
(echo "$msgc" &&
    sed -f $s ../dbinc/db.in &&
    cat ../dbinc_auto/ext_prot.in) > $t
test `egrep '@@.*@@' $t` && {
	egrep '@@.*@@' $t
	echo 'Unexpanded autoconf variables found in VxWorks db.h.'
	exit 1
}
f=../build_vxworks/db.h
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

cat <<ENDOFSEDTEXT > $s
s/@@INT64_FMT@@/#define	INT64_FMT	"%lld"/
s/@@UINT64_FMT@@/#define	UINT64_FMT	"%llu"/
s/@@PATH_SEPARATOR@@/\/\\\\\\\\/
s/@@db_int_def@@//
ENDOFSEDTEXT
(echo "$msgc" && sed -f $s ../dbinc/db_int.in) > $t
test `egrep '@@.*@@' $t` && {
	egrep '@@.*@@' $t
	echo 'Unexpanded autoconf variables found in VxWorks db_int.h.'
	exit 1
}
f=../build_vxworks/db_int.h
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

# Build the VxWorks db_config.h file.
# We don't fail, but we complain if the vx_config.in file isn't up-to-date.
check_config()
{
	egrep '^#undef' config.hin |
	    awk '{print $2}' | sed '/^SIZEOF_/d' | sort > $s
	(egrep '#undef' $1 | awk '{print $3}'
	 egrep '^#define' $1 | awk '{print $2}') | sort > $t
	cmp $s $t || {
		echo "config.hin and $1 differ"
		echo "<<< config.hin >>> $1"
		diff $s $t
	}
}
check_config vx_config.in
f=../build_vxworks/db_config.h
(echo "$msgc" && sed "s/__EDIT_DB_VERSION__/$DB_VERSION/" vx_config.in) > $t
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

f=../build_vxworks/db_config_small.h
(echo "$msgc" &&
    sed -e "s/__EDIT_DB_VERSION__/$DB_VERSION/" \
	-e "s;^#define.*HAVE_CRYPTO.*1;/* #undef HAVE_CRYPTO */;" \
	-e "s;^#define.*HAVE_HASH.*1;/* #undef HAVE_HASH */;" \
	-e "s;^#define.*HAVE_QUEUE.*1;/* #undef HAVE_QUEUE */;" \
	-e "s;^#define.*HAVE_REPLICATION.*1;/* #undef HAVE_REPLICATION */;" \
	-e "s;^#define.*HAVE_STATISTICS.*1;/* #undef HAVE_STATISTICS */;" \
	-e "s;^#define.*HAVE_VERIFY.*1;/* #undef HAVE_VERIFY */;" \
    vx_config.in) > $t
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

f=../build_vxworks/clib_port.h
cmp clib_port.h $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp clib_port.h $f && chmod 444 $f)

# Build a sed script that will change a "standard" DB utility into
# VxWorks-compatible code.
transform()
{
	# Build a sed script that will add argument parsing support and
	# rename all of the functions to be private to this file.
cat <<ENDOFSEDTEXT
/^main(argc, argv)$/{
i\\
$1(args)\\
\\	char *args;\\
{\\
\\	int argc;\\
\\	char **argv;\\
\\
\\	__db_util_arg("$1", args, &argc, &argv);\\
\\	return ($1_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS);\\
}\\
\\
#include <stdio.h>\\
#define	ERROR_RETURN	ERROR\\
\\
int\\
$1_main(argc, argv)
d
}
/^	while ((ch = getopt/i\\
\\	__db_getopt_reset = 1;
/^[	]*extern int optind;/s/;/, __db_getopt_reset;/
ENDOFSEDTEXT

	# Replace all function names with VxWorks safe names.
	# Function names are:
	#	Tokens starting at the beginning of the line, immediately
	#	followed by an opening parenthesis.
	# Replace:
	#	Matches preceded by a non-C-token character and immediately
	#	followed by an opening parenthesis.
	#	Matches preceded by a non-C-token character and immediately
	#	followed by " __P".
	#	Matches starting at the beginning of the line, immediately
	#	followed by an opening parenthesis.
	for k in `sed -e 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)(.*$/\1/p' -e d $2`; do
		echo "s/\([^a-zA-Z0-9_]\)\($k(\)/\1$1_\2/g"
		echo "s/\([^a-zA-Z0-9_]\)\($k[	 ]__P\)/\1$1_\2/g"
		echo "s/^\($k(\)/$1_\1/g"
	done

	# There is a special case the rules above don't catch:
	#	a txn_compare function used as an argument to qsort(3).
	#	a print_app_record function used as argument to
	#	    dbenv->set_app_dispatch).
	echo "s/, txn_compare);/, db_stat_txn_compare);/"
	echo "s/, print_app_record)) /, db_printlog_print_app_record)) /"

	# We convert the ex_access sample into dbdemo for VxWorks.
	echo 's/progname = "ex_access";/progname = "dbdemo";/'

	# The example programs have to load db_int.h, not db.h -- else
	# they won't have the right Berkeley DB prototypes for getopt
	# and friends.
	echo '/#include.*db.h/c\'
	echo '#include <db_config.h>\'
	echo '#include <db_int.h>'
}

PROGRAM_LIST="db_archive db_checkpoint db_deadlock db_dump db_hotbackup \
    db_load db_printlog db_recover db_stat db_upgrade db_verify ex_access"

# Build VxWorks versions of the utilities.
for i in $PROGRAM_LIST; do
	if [ $i = "ex_access" ]; then
		target=dbdemo
		dir=../examples_c
	else
		target=$i
		dir=../$i
	fi

	transform $target $dir/$i.c > $s
	sed -f $s < $dir/$i.c > $t

	f=../build_vxworks/$target/$target.c
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
done

# Output the build lines for a single utility.
#	$1 == application name
util_one()
{
	egrep "app=$1" srcfiles.in |
	awk '{print $1}' |
	sed 's/ex_access/dbdemo/' > $u

	# Build a list of source files.
	for i in `cat $u`; do
		if test "$1" = "ex_access" -o "$1" = `basename $i .c`; then
			i=`basename $i`
		else
			i="\$(PRJ_DIR)/../../$i"
		fi
		o="<BEGIN> FILE_$i"
		
		echo "${o}_dependDone"
		echo "FALSE"
		echo "<END>"
		echo
		echo "${o}_dependencies"
		echo "<END>"
		echo
		echo "${o}_objects"
		echo "`basename $i .c`.o"
		echo "<END>"
		echo
		echo "${o}_tool"
		echo "C/C++ compiler"
		echo "<END>"
		echo
	done
	echo "<BEGIN> PROJECT_FILES"
	for i in `cat $u`; do
		if test "$1" = "ex_access" -o "$1" = `basename $i .c`; then
			i="`basename $i`"
		else
			i="../../$i"
		fi
		echo "\$(PRJ_DIR)/$i"
	done |
	sed -e '${' \
	    -e 'p' \
	    -e 'd' \
	    -e '}' \
	    -e 's/$/ \\/'
	echo "<END>"
	echo
	echo "<BEGIN> userComments"
	if test "$1" = "ex_access"; then
		echo "dbdemo"
	else
		echo "$1"
	fi
	echo "<END>"
}

# Build VxWorks Tornado 2.0 project files for the utilities.
for i in $PROGRAM_LIST; do
	if [ $i = "ex_access" ]; then
		target=dbdemo
	else
		target=$i
	fi

	(sed -e "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.0/wpj.in
	    util_one $i) > $t
	f=../build_vxworks/$target/${target}20.wpj
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

	(sed -e "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.2/wpj.in
	    util_one $i) > $t
	f=../build_vxworks/$target/${target}22.wpj
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
done

# Build the list of files VxWorks knows about.
sed -e '/^$/d' -e '/^[	 #]/d' srcfiles.in |
    egrep -w vx |
    sed 's/[	 ].*//' > $vxfilelist

# Build the list of files VxWorks knows about.
sed -e '/^$/d' -e '/^[	 #]/d' srcfiles.in |
    egrep -w vxsmall |
    sed 's/[	 ].*//' > $vxsmallfiles

# Build VxWorks Tornado 2.0 project files for the library itself.
for v in 0 2 ; do
	#
	# Build regular project files
	#
	(cat vx_2.${v}/BerkeleyDB.wpj
	for i in `cat $vxfilelist`; do
		o="<BEGIN> FILE_\$(PRJ_DIR)/../$i"
		echo "${o}_dependDone"
		echo "TRUE"
		echo "<END>"
		echo
		echo "${o}_dependencies"
		echo "\$(PRJ_DIR)/db_config.h \\"
		echo "	\$(PRJ_DIR)/db_int.h \\"
		echo "	\$(PRJ_DIR)/db.h"
		echo "<END>"
		echo
		echo "${o}_objects"
		echo "`basename $i .c`.o"
		echo "<END>"
		echo
		echo "${o}_tool"
		echo "C/C++ compiler"
		echo "<END>"
		echo
	done
	echo "<BEGIN> PROJECT_FILES"
	sed -e '$!s/$/ \\/' \
	    -e 's/^/$(PRJ_DIR)\/..\//' \
	    -e '1!s/^/	/' < $vxfilelist
	echo "<END>"
	echo
	echo "<BEGIN> userComments"
	echo "BerkeleyDB"
	echo "<END>") > $t
	#
	# Build small lib project files
	#
	(cat vx_2.${v}/BerkeleyDBsmall.wpj
	for i in `cat $vxsmallfiles`; do
		o="<BEGIN> FILE_\$(PRJ_DIR)/../$i"
		echo "${o}_dependDone"
		echo "TRUE"
		echo "<END>"
		echo
		echo "${o}_dependencies"
		echo "\$(PRJ_DIR)/db_config.h \\"
		echo "	\$(PRJ_DIR)/db_int.h \\"
		echo "	\$(PRJ_DIR)/db.h"
		echo "<END>"
		echo
		echo "${o}_objects"
		echo "`basename $i .c`.o"
		echo "<END>"
		echo
		echo "${o}_tool"
		echo "C/C++ compiler"
		echo "<END>"
		echo
	done
	echo "<BEGIN> PROJECT_FILES"
	sed -e '$!s/$/ \\/' \
	    -e 's/^/$(PRJ_DIR)\/..\//' \
	    -e '1!s/^/	/' < $vxsmallfiles
	echo "<END>"
	echo
	echo "<BEGIN> userComments"
	echo "BerkeleyDB"
	echo "<END>") > $u
	f=../build_vxworks/BerkeleyDB2${v}.wpj
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
	f=../build_vxworks/BerkeleyDB2${v}small.wpj
	cmp $u $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $u $f && chmod 444 $f)
done
@


1.7
log
@Upgrade to db-4.4.16.
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 12.6 2005/11/03 17:46:13 bostic Exp $
d61 2
d92 15
d125 4
d216 58
a277 1
		dir=../examples_c
a279 1
		dir=../$i
d282 2
a283 1
	sed "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.0/wpj.in > $t
d287 3
a289 1
	sed "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.2/wpj.in > $t
a381 1

@


1.6
log
@Update to db-4.4.11.
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 12.3 2005/10/13 16:36:33 bostic Exp $
d35 1
d42 1
a42 1
s/@@u_int64_decl@@//
a46 1
/@@pid_t_decl@@/d
d51 2
d75 2
@


1.5
log
@Upgrade to db-4.4.4.
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 12.0 2004/11/17 03:43:36 bostic Exp $
d32 1
d34 1
a34 1
/@@stddef_h_decl@@/d
d46 1
d63 2
a64 1
`egrep '@@.*@@' $t` && {
d77 2
a78 1
`egrep '@@.*@@' $t` && {
d170 2
a171 2
PROGRAM_LIST="db_archive db_checkpoint db_deadlock db_dump db_load \
    db_printlog db_recover db_stat db_upgrade db_verify ex_access"
@


1.4
log
@Upgrade to db-4.3.21.
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 1.52 2004/10/15 18:28:21 bostic Exp $
@


1.4.2.1
log
@Update to db-4.4.11.
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 12.3 2005/10/13 16:36:33 bostic Exp $
d32 1
a33 2
/@@stdint_h_decl@@/d
/@@unistd_h_decl@@/d
a44 1
/@@pid_t_decl@@/d
d61 1
a61 2
test `egrep '@@.*@@' $t` && {
	egrep '@@.*@@' $t
d74 1
a74 2
test `egrep '@@.*@@' $t` && {
	egrep '@@.*@@' $t
d166 2
a167 2
PROGRAM_LIST="db_archive db_checkpoint db_deadlock db_dump db_hotbackup \
    db_load db_printlog db_recover db_stat db_upgrade db_verify ex_access"
@


1.4.2.2
log
@- upgrade to db-4.4.16.
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 12.6 2005/11/03 17:46:13 bostic Exp $
a34 1
/@@thread_h_decl@@/d
d41 1
a41 1
s/@@u_int64_decl@@/typedef unsigned long long u_int64_t;/
d46 1
a50 2
/@@pid_t_decl@@/d
s/@@db_threadid_t_decl@@/typedef uintmax_t db_threadid_t;/
a72 2
s/@@INT64_FMT@@/#define	INT64_FMT	"%lld"/
s/@@UINT64_FMT@@/#define	UINT64_FMT	"%llu"/
@


1.4.2.3
log
@Merge db-4.5.20 onto rpm-4_4 branch.
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 12.13 2006/09/13 16:57:49 bostic Exp $
a60 2
/@@platform_header@@/d
/@@platform_footer@@/d
a89 15
# Build the VxWorks db_config.h file.
# We don't fail, but we complain if the vx_config.in file isn't up-to-date.
check_config()
{
	egrep '^#undef' config.hin |
	    awk '{print $2}' | sed '/^SIZEOF_/d' | sort > $s
	(egrep '#undef' $1 | awk '{print $3}'
	 egrep '^#define' $1 | awk '{print $2}') | sort > $t
	cmp $s $t || {
		echo "config.hin and $1 differ"
		echo "<<< config.hin >>> $1"
		diff $s $t
	}
}
check_config vx_config.in
a107 4
f=../build_vxworks/clib_port.h
cmp clib_port.h $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp clib_port.h $f && chmod 444 $f)

a194 58
# Output the build lines for a single utility.
#	$1 == application name
util_one()
{
	egrep "app=$1" srcfiles.in |
	awk '{print $1}' |
	sed 's/ex_access/dbdemo/' > $u

	# Build a list of source files.
	for i in `cat $u`; do
		if test "$1" = "ex_access" -o "$1" = `basename $i .c`; then
			i=`basename $i`
		else
			i="\$(PRJ_DIR)/../../$i"
		fi
		o="<BEGIN> FILE_$i"
		
		echo "${o}_dependDone"
		echo "FALSE"
		echo "<END>"
		echo
		echo "${o}_dependencies"
		echo "<END>"
		echo
		echo "${o}_objects"
		echo "`basename $i .c`.o"
		echo "<END>"
		echo
		echo "${o}_tool"
		echo "C/C++ compiler"
		echo "<END>"
		echo
	done
	echo "<BEGIN> PROJECT_FILES"
	for i in `cat $u`; do
		if test "$1" = "ex_access" -o "$1" = `basename $i .c`; then
			i="`basename $i`"
		else
			i="../../$i"
		fi
		echo "\$(PRJ_DIR)/$i"
	done |
	sed -e '${' \
	    -e 'p' \
	    -e 'd' \
	    -e '}' \
	    -e 's/$/ \\/'
	echo "<END>"
	echo
	echo "<BEGIN> userComments"
	if test "$1" = "ex_access"; then
		echo "dbdemo"
	else
		echo "$1"
	fi
	echo "<END>"
}

d199 1
d202 1
d205 1
a205 2
	(sed -e "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.0/wpj.in
	    util_one $i) > $t
d209 1
a209 3

	(sed -e "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.2/wpj.in
	    util_one $i) > $t
d302 1
@


1.3
log
@... and in with the New ...
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 1.49 2004/10/07 18:01:56 sue Exp $
a19 1
f=../build_vxworks/db.h
d46 2
d61 5
a68 1
f=../build_vxworks/db_int.h
a70 2
s/@@uintmax_t_decl@@/typedef unsigned long uintmax_t;/
s/@@uintptr_t_decl@@/typedef unsigned long uintptr_t;/
d74 5
@


1.2
log
@- upgrade to db-4.2.52.
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 1.42 2003/08/27 16:23:33 sue Exp $
d12 3
a14 1
vxfilelist=/tmp/__db_c
d16 2
a17 2
trap 'rm -f $s $t $vxfilelist ; exit 0' 0
trap 'rm -f $s $t $vxfilelist ; exit 1' 1 2 3 13 15
d32 3
d36 1
d38 1
d40 2
a41 3
/@@inttypes_decl@@/d
/@@int16_decl@@/d
/@@int32_decl@@/d
d47 1
a58 1
    cat ../dbinc_auto/rpc_defs.in &&
d66 2
a67 2
s/@@db_align_t_decl@@/typedef unsigned long db_align_t;/
s/@@db_alignp_t_decl@@/typedef unsigned long db_alignp_t;/
d79 13
d204 5
d211 3
d245 34
d282 3
a286 112
# Build VxWorks Tornado 3.1 project files for the utilities.
for i in $PROGRAM_LIST; do
	if [ $i = "ex_access" ]; then
		target=dbdemo
		dir=../examples_c
	else
		target=$i
		dir=../$i
	fi

	cp vx_3.1/Makefile.custom $t
	f=../build_vxworks/$target/$target/Makefile.custom
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

	for j in component.cdf component.wpj; do
		#
		# Some parts of the component files needs to have the
		# name in all capitals.  Sigh.
		#
		z=`echo $target | tr "a-z" "A-Z"`
		sed -e "s/__DB_APPLICATION_NAME__/$target/g" \
		    -e "s/__DB_CAPAPPL_NAME__/$z/g" < vx_3.1/$j > $t
		f=../build_vxworks/$target/$target/$j
		cmp $t $f > /dev/null 2>&1 ||
		    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
	done
done

# Build VxWorks Tornado 3.1 project files for the library itself.
cp vx_3.1/Makefile.custom $t
f=../build_vxworks/BerkeleyDB/Makefile.custom
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

(cat vx_3.1/cdf.1
echo -n "	MODULES"
for i in `cat $vxfilelist`; do
	echo "			`basename $i .c`.o"
done | sort | sed -e '$!s/$/ \\/'
cat vx_3.1/cdf.2
for i in `cat $vxfilelist`; do
	b="`basename $i .c`.o"
	echo "Module $b {"
	echo
	echo "	NAME		$b"
	echo "	SRC_PATH_NAME	\$(PRJ_DIR)/../../$i"
	echo "}"
	echo
done
cat vx_3.1/cdf.3)> $t
f=../build_vxworks/BerkeleyDB/component.cdf
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

(cat vx_3.1/wpj.1
for i in `cat $vxfilelist`; do
	o="<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_\$(PRJ_DIR)/../../$i"
	echo "${o}_infoTags"
	echo "toolMacro objects"
	echo "<END>"
	echo
	echo "${o}_objects"
	echo "`basename $i .c`.o"
	echo "<END>"
	echo
	echo "${o}_toolMacro"
	echo "CC"
	echo "<END>"
	echo
done
cat vx_3.1/wpj.2
for i in `cat $vxfilelist`; do
	o="<BEGIN> BUILD_PENTIUM2gnu.release_FILE_\$(PRJ_DIR)/../../$i"
	echo "${o}_infoTags"
	echo "toolMacro objects"
	echo "<END>"
	echo
	echo "${o}_objects"
	echo "`basename $i .c`.o"
	echo "<END>"
	echo
	echo "${o}_toolMacro"
	echo "CC"
	echo "<END>"
	echo
done
cat vx_3.1/wpj.3
for i in `cat $vxfilelist`; do
	o="<BEGIN> BUILD_PENTIUMgnu.debug_FILE_\$(PRJ_DIR)/../../$i"
	echo "${o}_infoTags"
	echo "toolMacro objects"
	echo "<END>"
	echo
	echo "${o}_objects"
	echo "`basename $i .c`.o"
	echo "<END>"
	echo
	echo "${o}_toolMacro"
	echo "CC"
	echo "<END>"
	echo
done
cat vx_3.1/wpj.4
sort $vxfilelist |
sed -e 's/^/$(PRJ_DIR)\/..\/..\//' \
    -e '1!s/^/	/' \
    -e '$!s/$/ \\/'
cat vx_3.1/wpj.5) > $t
f=../build_vxworks/BerkeleyDB/component.wpj
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 1.3 2000/07/13 18:38:46 bostic Exp $
d10 3
a12 2
t=/tmp/__db_$$
rm -f $t
d14 2
a15 1
trap 'rm -f $t ; exit 1' 1 2 3 13 15
d17 1
d19 11
a29 3
echo "Building $f"
rm -f $f
cat <<ENDOFSEDTEXT > $t
d33 1
d45 4
d50 6
a55 2
(echo "$msgc" && sed -f $t ../include/db.src) > $f
chmod 444 $f
d58 2
a59 4
echo "Building $f"
rm -f $f
cat <<ENDOFSEDTEXT > $t
s/\(PATH_SEPARATOR[^"]*"\)\/"/\1\/\\\\\\\\\\"/
d62 1
d64 3
a66 2
(echo "$msgc" && sed -f $t ../include/db_int.src) > $f
chmod 444 $f
d68 267
a334 1
rm -f $t
@


1.1.1.1
log
@db-3.2.9
@
text
@@


1.1.1.2
log
@track: auto import
@
text
@d2 1
a2 1
#	Id: s_vxworks,v 1.5 2001/04/18 13:21:19 sue Exp 
d34 1
a34 4
(echo "$msgc" &&
    sed -f $t ../include/db.in && 
    cat ../include_auto/rpc_defs.in &&
    cat ../include_auto/global_ext.in) > $f
d45 1
a45 1
(echo "$msgc" && sed -f $t ../include/db_int.in) > $f
@


1.1.1.2.2.1
log
@Merge db-3.3.11 onto rpm-4_0 branch.
@
text
@d2 1
a2 1
#	$Id: s_vxworks,v 1.6 2001/05/27 14:12:00 bostic Exp $
d10 2
a11 3
s=/tmp/__db_a$$
t=/tmp/__db_b$$
rm -f $s $t
d13 1
a13 1
trap 'rm -f $s $t ; exit 1' 1 2 3 13 15
d16 3
a18 1
cat <<ENDOFSEDTEXT > $s
d35 1
a35 1
    sed -f $s ../include/db.in && 
d37 2
a38 3
    cat ../include_auto/global_ext.in) > $t
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
d41 3
a43 1
cat <<ENDOFSEDTEXT > $s
d48 2
a49 3
(echo "$msgc" && sed -f $s ../include/db_int.in) > $t
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
d51 1
a51 1
rm -f $s $t
@


1.1.1.2.2.2
log
@Update to db-4.0.14.
@
text
@d2 1
a2 1
#	Id: s_vxworks,v 1.21 2001/10/05 02:27:33 bostic Exp 
d10 3
a12 2
s=/tmp/__db_a
t=/tmp/__db_b
a13 1
trap 'rm -f $s $t ; exit 0' 0
a17 10
/extern "C" {/{
n
n
i\\
\\
/* Tornado 2 does not provide a standard C pre-processor #define. */\\
#ifndef __vxworks\\
#define	__vxworks\\
#endif
}
d34 1
a34 1
    sed -f $s ../include/db.in &&
d50 1
a50 83
# Build VxWorks Tornado 2.0 project files for the utilities.
transform()
{
	local i

# Build a sed script that will add argument parsing support and rename all
# of the functions to be private to this file.
cat <<ENDOFSEDTEXT
/^main(argc, argv)$/{
i\\
$1(args)\\
\\	char *args;\\
{\\
\\	int argc;\\
\\	char **argv;\\
\\
\\	__db_util_arg("$1", args, &argc, &argv);\\
\\	return ($1_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS);\\
}\\
\\
#include <stdio.h>\\
#define	ERROR_RETURN	ERROR\\
\\
int\\
$1_main(argc, argv)
d
}
/^	while ((ch = getopt/i\\
\\	__db_getopt_reset = 1;
/^	extern int optind;/s/;/, __db_getopt_reset;/
ENDOFSEDTEXT

# Replace all function names with VxWorks safe names.
# Function names are:
#	Tokens starting at the beginning of the line, immediately followed
#	by an opening parenthesis.
# Replace:
#	Matches preceded by a non-C-token character and immediately followed
#	by an opening parenthesis.
#	Matches preceded by a non-C-token character and immediately followed
#	by " __P".
#	Matches starting at the beginning of the line, immediately followed
#	by an opening parenthesis.
	for i in `sed -e 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)(.*$/\1/p' -e d $2`; do
		echo "s/\([^a-zA-Z0-9_]\)\($i(\)/\1$1_\2/g"
		echo "s/\([^a-zA-Z0-9_]\)\($i[	 ]__P\)/\1$1_\2/g"
		echo "s/^\($i(\)/$1_\1/g"
	done

# There is a special case the rules above don't catch.  There's a txn_compare
# function, used as an argument to qsort(3).  Catch it explicitly.
	echo "s/, txn_compare);/, db_stat_txn_compare);/"
}

for i in db_archive db_checkpoint db_deadlock \
    db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify; do

	transform $i ../$i/$i.c > $s
	sed -f $s < ../$i/$i.c > $t

	f=../build_vxworks/$i/$i.c
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

	sed "s/__DB_APPLICATION_NAME__/$i/g" < wpj.in > $t
	f=../build_vxworks/$i/$i.wpj
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

	for j in \
	    Makefile.component Makefile.custom component.cdf component.wpj; do
		#
		# Some parts of the component files needs to have the
		# name in CAPS.  Sigh.
		#
		z=`echo $i | tr "a-z" "A-Z"`
		sed -e "s/__DB_APPLICATION_NAME__/$i/g" \
		    -e "s/__DB_CAPAPPL_NAME__/$z/g" < vx_ae.in/$j > $t
		f=../build_vxworks/$i/$i/$j
		cmp $t $f > /dev/null 2>&1 ||
		    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
	done
done
@


1.1.1.3
log
@track: auto import
@
text
@d2 1
a2 1
#	Id: s_vxworks,v 1.6 2001/05/27 14:12:00 bostic Exp 
d10 2
a11 3
s=/tmp/__db_a$$
t=/tmp/__db_b$$
rm -f $s $t
d13 1
a13 1
trap 'rm -f $s $t ; exit 1' 1 2 3 13 15
d16 3
a18 1
cat <<ENDOFSEDTEXT > $s
d35 1
a35 1
    sed -f $s ../include/db.in && 
d37 2
a38 3
    cat ../include_auto/global_ext.in) > $t
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
d41 3
a43 1
cat <<ENDOFSEDTEXT > $s
d48 2
a49 3
(echo "$msgc" && sed -f $s ../include/db_int.in) > $t
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
d51 1
a51 1
rm -f $s $t
@


1.1.1.4
log
@track: auto import
@
text
@d2 1
a2 1
#	Id: s_vxworks,v 1.21 2001/10/05 02:27:33 bostic Exp 
d10 3
a12 2
s=/tmp/__db_a
t=/tmp/__db_b
a13 1
trap 'rm -f $s $t ; exit 0' 0
a17 10
/extern "C" {/{
n
n
i\\
\\
/* Tornado 2 does not provide a standard C pre-processor #define. */\\
#ifndef __vxworks\\
#define	__vxworks\\
#endif
}
d34 1
a34 1
    sed -f $s ../include/db.in &&
d50 1
a50 83
# Build VxWorks Tornado 2.0 project files for the utilities.
transform()
{
	local i

# Build a sed script that will add argument parsing support and rename all
# of the functions to be private to this file.
cat <<ENDOFSEDTEXT
/^main(argc, argv)$/{
i\\
$1(args)\\
\\	char *args;\\
{\\
\\	int argc;\\
\\	char **argv;\\
\\
\\	__db_util_arg("$1", args, &argc, &argv);\\
\\	return ($1_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS);\\
}\\
\\
#include <stdio.h>\\
#define	ERROR_RETURN	ERROR\\
\\
int\\
$1_main(argc, argv)
d
}
/^	while ((ch = getopt/i\\
\\	__db_getopt_reset = 1;
/^	extern int optind;/s/;/, __db_getopt_reset;/
ENDOFSEDTEXT

# Replace all function names with VxWorks safe names.
# Function names are:
#	Tokens starting at the beginning of the line, immediately followed
#	by an opening parenthesis.
# Replace:
#	Matches preceded by a non-C-token character and immediately followed
#	by an opening parenthesis.
#	Matches preceded by a non-C-token character and immediately followed
#	by " __P".
#	Matches starting at the beginning of the line, immediately followed
#	by an opening parenthesis.
	for i in `sed -e 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)(.*$/\1/p' -e d $2`; do
		echo "s/\([^a-zA-Z0-9_]\)\($i(\)/\1$1_\2/g"
		echo "s/\([^a-zA-Z0-9_]\)\($i[	 ]__P\)/\1$1_\2/g"
		echo "s/^\($i(\)/$1_\1/g"
	done

# There is a special case the rules above don't catch.  There's a txn_compare
# function, used as an argument to qsort(3).  Catch it explicitly.
	echo "s/, txn_compare);/, db_stat_txn_compare);/"
}

for i in db_archive db_checkpoint db_deadlock \
    db_dump db_load db_printlog db_recover db_stat db_upgrade db_verify; do

	transform $i ../$i/$i.c > $s
	sed -f $s < ../$i/$i.c > $t

	f=../build_vxworks/$i/$i.c
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

	sed "s/__DB_APPLICATION_NAME__/$i/g" < wpj.in > $t
	f=../build_vxworks/$i/$i.wpj
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

	for j in \
	    Makefile.component Makefile.custom component.cdf component.wpj; do
		#
		# Some parts of the component files needs to have the
		# name in CAPS.  Sigh.
		#
		z=`echo $i | tr "a-z" "A-Z"`
		sed -e "s/__DB_APPLICATION_NAME__/$i/g" \
		    -e "s/__DB_CAPAPPL_NAME__/$z/g" < vx_ae.in/$j > $t
		f=../build_vxworks/$i/$i/$j
		cmp $t $f > /dev/null 2>&1 ||
		    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
	done
done
@


1.1.1.5
log
@track: auto import
@
text
@d2 1
a2 1
#	Id: s_vxworks,v 1.36 2002/05/20 19:18:14 bostic Exp 
a11 1
vxfilelist=/tmp/__db_c
d13 2
a14 2
trap 'rm -f $s $t $vxfilelist ; exit 0' 0
trap 'rm -f $s $t $vxfilelist ; exit 1' 1 2 3 13 15
a15 1
# Build the VxWorks automatically generated files.
a41 1
s/@@DB_VERSION_UNIQUE_NAME@@//
d44 3
a46 3
    sed -f $s ../dbinc/db.in &&
    cat ../dbinc_auto/rpc_defs.in &&
    cat ../dbinc_auto/ext_prot.in) > $t
a54 1
s/@@db_int_def@@//
d56 1
a56 1
(echo "$msgc" && sed -f $s ../dbinc/db_int.in) > $t
d60 1
a60 7
f=../build_vxworks/db_config.h
(echo "$msgc" && sed "s/__EDIT_DB_VERSION__/$DB_VERSION/" vx_config.in) > $t
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

# Build a sed script that will change a "standard" DB utility into
# VxWorks-compatible code.
d63 4
a66 2
	# Build a sed script that will add argument parsing support and
	# rename all of the functions to be private to this file.
d89 1
a89 1
/^[	]*extern int optind;/s/;/, __db_getopt_reset;/
d92 15
a106 15
	# Replace all function names with VxWorks safe names.
	# Function names are:
	#	Tokens starting at the beginning of the line, immediately
	#	followed by an opening parenthesis.
	# Replace:
	#	Matches preceded by a non-C-token character and immediately
	#	followed by an opening parenthesis.
	#	Matches preceded by a non-C-token character and immediately
	#	followed by " __P".
	#	Matches starting at the beginning of the line, immediately
	#	followed by an opening parenthesis.
	for k in `sed -e 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)(.*$/\1/p' -e d $2`; do
		echo "s/\([^a-zA-Z0-9_]\)\($k(\)/\1$1_\2/g"
		echo "s/\([^a-zA-Z0-9_]\)\($k[	 ]__P\)/\1$1_\2/g"
		echo "s/^\($k(\)/$1_\1/g"
d109 2
a110 4
	# There is a special case the rules above don't catch:
	#	a txn_compare function used as an argument to qsort(3).
	#	a print_app_record function used as argument to
	#	    dbenv->set_app_dispatch).
a111 8
	echo "s/, print_app_record)) /, db_printlog_print_app_record)) /"

	# We convert the ex_access sample into dbdemo for VxWorks.
	echo 's/progname = "ex_access";/progname = "dbdemo";/'

	# VxWorks programs have to load db_int.h, not db.h -- else
	# they won't have the right Berkeley DB prototypes.
	echo '/#include.*db.h/s/db.h/db_int.h/'
d114 2
a115 2
PROGRAM_LIST="db_archive db_checkpoint db_deadlock db_dump db_load \
    db_printlog db_recover db_stat db_upgrade db_verify ex_access"
d117 2
a118 9
# Build VxWorks versions of the utilities.
for i in $PROGRAM_LIST; do
	if [ $i = "ex_access" ]; then
		target=dbdemo
		dir=../examples_c
	else
		target=$i
		dir=../$i
	fi
d120 1
a120 4
	transform $target $dir/$i.c > $s
	sed -f $s < $dir/$i.c > $t

	f=../build_vxworks/$target/$target.c
a122 1
done
d124 2
a125 12
# Build VxWorks Tornado 2.0 project files for the utilities.
for i in $PROGRAM_LIST; do
	if [ $i = "ex_access" ]; then
		target=dbdemo
		dir=../examples_c
	else
		target=$i
		dir=../$i
	fi

	sed "s/__DB_APPLICATION_NAME__/$target/g" < vx_2.0/wpj.in > $t
	f=../build_vxworks/$target/$target.wpj
a127 52
done

# Build the list of files VxWorks knows about.
sed -e '/^$/d' -e '/^[	 #]/d' srcfiles.in |
    egrep -w vx |
    sed 's/[	 ].*//' > $vxfilelist

# Build VxWorks Tornado 2.0 project files for the library itself.
(cat vx_2.0/BerkeleyDB.wpj
for i in `cat $vxfilelist`; do
	o="<BEGIN> FILE_\$(PRJ_DIR)/../$i"
	echo "${o}_dependDone"
	echo "TRUE"
	echo "<END>"
	echo
	echo "${o}_dependencies"
	echo "\$(PRJ_DIR)/db_config.h \\"
	echo "	\$(PRJ_DIR)/db_int.h \\"
	echo "	\$(PRJ_DIR)/db.h"
	echo "<END>"
	echo
	echo "${o}_objects"
	echo "`basename $i .c`.o"
	echo "<END>"
	echo
	echo "${o}_tool"
	echo "C/C++ compiler"
	echo "<END>"
	echo
done
echo "<BEGIN> PROJECT_FILES"
sed -e '$!s/$/ \\/' \
    -e 's/^/$(PRJ_DIR)\/..\//' \
    -e '1!s/^/	/' < $vxfilelist
echo "<END>"
echo
echo "<BEGIN> userComments"
echo "BerkeleyDB"
echo "<END>") > $t
f=../build_vxworks/BerkeleyDB.wpj
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

# Build VxWorks Tornado 3.1 project files for the utilities.
for i in $PROGRAM_LIST; do
	if [ $i = "ex_access" ]; then
		target=dbdemo
		dir=../examples_c
	else
		target=$i
		dir=../$i
	fi
d129 2
a130 6
	cp vx_3.1/Makefile.custom $t
	f=../build_vxworks/$target/$target/Makefile.custom
	cmp $t $f > /dev/null 2>&1 ||
	    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

	for j in component.cdf component.wpj; do
d133 1
a133 1
		# name in all capitals.  Sigh.
d135 4
a138 4
		z=`echo $target | tr "a-z" "A-Z"`
		sed -e "s/__DB_APPLICATION_NAME__/$target/g" \
		    -e "s/__DB_CAPAPPL_NAME__/$z/g" < vx_3.1/$j > $t
		f=../build_vxworks/$target/$target/$j
a142 84

# Build VxWorks Tornado 3.1 project files for the library itself.
cp vx_3.1/Makefile.custom $t
f=../build_vxworks/BerkeleyDB/Makefile.custom
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

(cat vx_3.1/cdf.1
echo -n "	MODULES"
for i in `cat $vxfilelist`; do
	echo "			`basename $i .c`.o"
done | sort | sed -e '$!s/$/ \\/'
cat vx_3.1/cdf.2
for i in `cat $vxfilelist`; do
	b="`basename $i .c`.o"
	echo "Module $b {"
	echo
	echo "	NAME		$b"
	echo "	SRC_PATH_NAME	\$(PRJ_DIR)/../../$i"
	echo "}"
	echo
done
cat vx_3.1/cdf.3)> $t
f=../build_vxworks/BerkeleyDB/component.cdf
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)

(cat vx_3.1/wpj.1
for i in `cat $vxfilelist`; do
	o="<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_\$(PRJ_DIR)/../../$i"
	echo "${o}_infoTags"
	echo "toolMacro objects"
	echo "<END>"
	echo
	echo "${o}_objects"
	echo "`basename $i .c`.o"
	echo "<END>"
	echo
	echo "${o}_toolMacro"
	echo "CC"
	echo "<END>"
	echo
done
cat vx_3.1/wpj.2
for i in `cat $vxfilelist`; do
	o="<BEGIN> BUILD_PENTIUM2gnu.release_FILE_\$(PRJ_DIR)/../../$i"
	echo "${o}_infoTags"
	echo "toolMacro objects"
	echo "<END>"
	echo
	echo "${o}_objects"
	echo "`basename $i .c`.o"
	echo "<END>"
	echo
	echo "${o}_toolMacro"
	echo "CC"
	echo "<END>"
	echo
done
cat vx_3.1/wpj.3
for i in `cat $vxfilelist`; do
	o="<BEGIN> BUILD_PENTIUMgnu.debug_FILE_\$(PRJ_DIR)/../../$i"
	echo "${o}_infoTags"
	echo "toolMacro objects"
	echo "<END>"
	echo
	echo "${o}_objects"
	echo "`basename $i .c`.o"
	echo "<END>"
	echo
	echo "${o}_toolMacro"
	echo "CC"
	echo "<END>"
	echo
done
cat vx_3.1/wpj.4
sort $vxfilelist |
sed -e 's/^/$(PRJ_DIR)\/..\/..\//' \
    -e '1!s/^/	/' \
    -e '$!s/$/ \\/'
cat vx_3.1/wpj.5) > $t
f=../build_vxworks/BerkeleyDB/component.wpj
cmp $t $f > /dev/null 2>&1 ||
    (echo "Building $f" && rm -f $f && cp $t $f && chmod 444 $f)
@


1.1.1.6
log
@track: auto import
@
text
@d2 1
a2 1
#	Id: s_vxworks,v 1.37 2002/08/19 21:27:06 bostic Exp 
d127 3
a129 6
	# The example programs have to load db_int.h, not db.h -- else
	# they won't have the right Berkeley DB prototypes for getopt
	# and friends.
	echo '/#include.*db.h/c\'
	echo '#include <db_config.h>\'
	echo '#include <db_int.h>'
@


