1999-04-29 03:59:00 +08:00
|
|
|
#! /bin/sh
|
1999-08-30 16:08:00 +08:00
|
|
|
# $OpenLDAP$
|
2002-01-05 05:17:25 +08:00
|
|
|
## Copyright 1998-2002 The OpenLDAP Foundation
|
1999-07-29 04:35:22 +08:00
|
|
|
## COPYING RESTRICTIONS APPLY. See COPYRIGHT File in top level directory
|
|
|
|
## of this package for details.
|
1999-04-29 03:59:00 +08:00
|
|
|
#
|
|
|
|
# Create a version.c file
|
|
|
|
#
|
|
|
|
PACKAGE=OpenLDAP
|
|
|
|
VERSION=unknown
|
|
|
|
SYMBOL=__Version
|
|
|
|
static=static
|
|
|
|
const=const
|
|
|
|
while :
|
|
|
|
do case "$1" in
|
|
|
|
-p)
|
|
|
|
PACKAGE=$2
|
|
|
|
shift; shift ;;
|
|
|
|
-v)
|
|
|
|
VERSION=$2
|
|
|
|
shift; shift ;;
|
|
|
|
|
|
|
|
-c)
|
|
|
|
const=
|
|
|
|
shift ;;
|
|
|
|
-n)
|
|
|
|
SYMBOL=$2
|
|
|
|
shift; shift ;;
|
|
|
|
-s)
|
|
|
|
static=
|
|
|
|
shift ;;
|
|
|
|
|
|
|
|
# -*) shift ;;
|
|
|
|
*)
|
|
|
|
break ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
if test $# != 1 ; then
|
|
|
|
echo 'usage: mkversion [-c] [-s] [-p package] [-v version] application'
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
APPLICATION=$1
|
|
|
|
WHEN=`date`
|
|
|
|
WHOWHERE="$USER@`uname -n`:`pwd`"
|
|
|
|
|
|
|
|
cat << __EOF__
|
|
|
|
/*
|
2002-01-05 05:17:25 +08:00
|
|
|
* Copyright 1998-2002 The OpenLDAP Foundation
|
2002-02-11 01:50:58 +08:00
|
|
|
* COPYING RESTRICTIONS APPLY. See COPYRIGHT file in top level directory
|
1999-04-29 03:59:00 +08:00
|
|
|
* of this package for details.
|
|
|
|
*/
|
2002-02-11 01:50:58 +08:00
|
|
|
static const char copyright[] =
|
|
|
|
"Copyright 1998-2002 The OpenLDAP Foundation\n"
|
|
|
|
"COPYING RESTRICTIONS APPLY\n";
|
1999-04-29 03:59:00 +08:00
|
|
|
|
|
|
|
$static $const char $SYMBOL[] =
|
|
|
|
"@(#) \$$PACKAGE: $APPLICATION $VERSION ($WHEN) \$\n\t$WHOWHERE\n";
|
|
|
|
|
|
|
|
__EOF__
|