#!/bin/rc
# Create a version.c file
# $OpenLDAP: pkg/ldap/build/mkversion,v 1.12.2.3 2007/01/02 21:43:41 kurt Exp $
## This work is part of OpenLDAP Software <http://www.openldap.org/>.
##
## Copyright 1998-2007 The OpenLDAP Foundation.
## All rights reserved.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted only as authorized by the OpenLDAP
## Public License.
##
## A copy of this license is available in the file LICENSE in the
## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
PACKAGE=OpenLDAP
VERSION='2.3.35'
SYMBOL=__Version
static=static
const=const
while (test $#* -gt 1) {
switch($1) {
case '-p'
PACKAGE=$2
shift; shift
case '-v'
VERSION=$2
shift; shift
case '-c'
const=''
shift
case '-n'
SYMBOL=$2
shift; shift
case '-s'
static=''
shift
case *
shift
}
}
if (~ $# 1) {
echo >[2] 'usage: mkvers.rc [-c] [-s] [-p package] [-v version] application'
exit 'usage'
}
APPLICATION=$1
WHOWHERE=`{cat /dev/user}^'@'^`{ape/uname -n}^':'^`{pwd}
echo '/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
* Copyright 1998-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted only as authorized by the OpenLDAP
* Public License.
*
* A copy of this license is available in the file LICENSE in the
* top-level directory of the distribution or, alternatively, at
* <http://www.OpenLDAP.org/license.html>.
*/
static '^$const^' char copyright[] =
"Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved.\n"
"COPYING RESTRICTIONS APPLY\n";
'^$static^' '^$const^' char '^$SYMBOL^'[] =
"@(#) $'^$PACKAGE^': '^$APPLICATION^' '^$VERSION^' (" __DATE__ " " __TIME__ ") $\n"
'
echo '
"\t'^$WHOWHERE^'\n";
'
|