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