#! /bin/sh
test -d $BDB_SRC -a -d $TARGET || {
echo "Xindex: \$BDB_SRC or \$TARGET not set"
exit 1
}
build()
{
echo '<html>'
echo '<head>'
echo "<title>Berkeley DB: $1 API Index</title>"
echo '<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">'
echo '<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">'
echo '</head>'
echo '<body bgcolor=white>'
echo "<h1 align=center>$1 API Index</h1>"
echo "<center>"
echo "<table cellspacing=0 cellpadding=0>"
(cat $BDB_SRC/docs_src/support/static.src $TARGET/$2/pindex.src;
egrep '^__APIREL__/ref/|^__APIREL__/ref_xml/' \
$TARGET/api_c/pindex.src) |
sort -u |
sort -f -t@ +1 |
sed -f $BDB_SRC/docs_src/support/html.sed |
sed -e 's/__APIREL__/../' \
-e 's/\([^ ]\)@/\1 @/' \
-e 's/^\([^ ]*\) \([^@]*\)@\([^ ]*\)\(.*\)/<tr><td align=right>\2<\/td><td>\ <a href="\1">\3<\/a>\4<\/td><\/tr>/'
echo "</table>"
echo "</center>"
echo "<p><font size=1>Copyright (c) 1996,2007 Oracle. All rights reserved.</font>"
echo "</body>"
echo "</html>"
}
[ -f $TARGET/api_c/pindex.src ] &&
build C api_c > $TARGET/api_c/c_pindex.html
[ -f $TARGET/api_cxx/pindex.src ] &&
build C++ api_cxx > $TARGET/api_cxx/cxx_pindex.html
[ -f $TARGET/api_tcl/pindex.src ] &&
build Tcl api_tcl > $TARGET/api_tcl/tcl_pindex.html
exit 0