3 base_name=`basename $0`
4 base_path=`echo $0 | sed s,$base_name,,`
6 db_dist="${base_path}../db/dist"
10 # XXX edit CFLAGS= ... out of invocation args ???
11 ARGS="`echo $* | sed -e 's% [^ ]*CFLAGS=[^ ]*%%' -e 's% -[^-][^ ]*%%g' -e 's%--cache-file=.*$%%'`"
13 CC="$CC" CFLAGS="$CFLAGS" $db_dist/configure $ARGS \
14 --enable-shared --enable-static --enable-rpc \
15 --with-uniquename=_rpmdb --srcdir=$db_dist
17 mv Makefile Makefile.orig
18 cat Makefile.orig | sed -e '/^install[:-]/c\
21 \ @echo $(OBJS) $(C_OBJS) \
23 distdir install check:\
25 db4_install: all install_setip' > Makefile
29 -e '/^typedef u_int32_t db_pgno_t;/i\
30 /*@-incondefs -fielduse -enummemuse -typeuse @*/' \
31 -e '/^struct __key_range;/a\
33 -e '/^#define db_create/i\
34 /*@-declundef -noparams -fcnuse@*/' \
35 -e '/^int txn_commit __P((/a\
36 /*@=declundef =noparams =fcnuse =fielduse =enummemuse =typeuse @*/' > db.h
38 # Generate manifest for rpmdb.
39 make -s listobjs > db3lobjs