]> git.sur5r.net Git - openldap/blob - build/mkversion
minor cleanup
[openldap] / build / mkversion
1 #! /bin/sh
2 # $OpenLDAP$
3 ## Copyright 1998-2000 The OpenLDAP Foundation
4 ## COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
5 ## of this package for details.
6 #
7 # Create a version.c file
8 #
9 PACKAGE=OpenLDAP
10 VERSION=unknown
11 SYMBOL=__Version
12 static=static
13 const=const
14 while :
15         do case "$1" in
16                 -p)
17                         PACKAGE=$2
18                         shift; shift ;;
19                 -v)
20                         VERSION=$2
21                         shift; shift ;;
22
23                 -c)
24                         const=
25                         shift ;;
26                 -n)
27                         SYMBOL=$2
28                         shift; shift ;;
29                 -s)
30                         static=
31                         shift ;;
32
33 #               -*) shift ;;
34                 *)
35                         break ;;
36         esac
37 done
38
39 if test $# != 1 ; then
40         echo 'usage: mkversion [-c] [-s] [-p package] [-v version] application'
41         exit 1
42 fi
43
44 APPLICATION=$1
45 WHEN=`date`
46 WHOWHERE="$USER@`uname -n`:`pwd`"
47
48 cat << __EOF__
49 /*
50  * Copyright 1998-2000 The OpenLDAP Foundation
51  * COPYING RESTRICTIONS APPLY.  See COPYRIGHT File in top level directory
52  * of this package for details.
53  */
54
55 $static $const char $SYMBOL[] =
56 "@(#) \$$PACKAGE: $APPLICATION $VERSION ($WHEN) \$\n\t$WHOWHERE\n";
57
58 __EOF__