Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / bsd / openldap / dist / build / mkversion
bloba94348d5949891e41a8dd895a3e30385dd9df121
1 #! /bin/sh
2 # Create a version.c file
3 # $OpenLDAP: pkg/ldap/build/mkversion,v 1.14.2.3 2008/02/11 23:26:37 kurt Exp $
4 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 ##
6 ## Copyright 1998-2008 The OpenLDAP Foundation.
7 ## All rights reserved.
8 ##
9 ## Redistribution and use in source and binary forms, with or without
10 ## modification, are permitted only as authorized by the OpenLDAP
11 ## Public License.
13 ## A copy of this license is available in the file LICENSE in the
14 ## top-level directory of the distribution or, alternatively, at
15 ## <http://www.OpenLDAP.org/license.html>.
17 PACKAGE=OpenLDAP
18 VERSION=unknown
19 SYMBOL=__Version
20 static=static
21 const=const
22 while :
23 do case "$1" in
24 -p)
25 PACKAGE=$2
26 shift; shift ;;
27 -v)
28 VERSION=$2
29 shift; shift ;;
31 -c)
32 const=
33 shift ;;
34 -n)
35 SYMBOL=$2
36 shift; shift ;;
37 -s)
38 static=
39 shift ;;
41 # -*) shift ;;
43 break ;;
44 esac
45 done
47 if test $# != 1 ; then
48 echo 'usage: mkversion [-c] [-s] [-p package] [-v version] application'
49 exit 1
52 APPLICATION=$1
54 cat << __EOF__
55 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
57 * Copyright 1998-2008 The OpenLDAP Foundation.
58 * All rights reserved.
60 * Redistribution and use in source and binary forms, with or without
61 * modification, are permitted only as authorized by the OpenLDAP
62 * Public License.
64 * A copy of this license is available in the file LICENSE in the
65 * top-level directory of the distribution or, alternatively, at
66 * <http://www.OpenLDAP.org/license.html>.
69 static const char copyright[] =
70 "Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved.\n"
71 "COPYING RESTRICTIONS APPLY\n";
73 $static $const char $SYMBOL[] =
74 "@(#) \$$PACKAGE: $APPLICATION $VERSION \$\n";
76 __EOF__