Do not list version.c in itself.
[ircu2.10.12-pk.git] / ircd / version.c.SH
1 #! /bin/sh
2
3 echo "Extracting ircd/version.c ..."
4
5 srcdir=$1
6
7 if test -r version.c
8 then
9    generation=`sed -n 's/^const char \*generation = \"\(.*\)\";/\1/p' < version.c`
10    if test ! "$generation" ; then generation=0; fi
11 else
12    generation=0
13 fi
14
15 generation=`expr $generation + 1`
16
17 creation=`date | \
18 awk '{if (NF == 6) \
19          { print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \
20 else \
21          { print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'`
22
23 /bin/cat >version.c <<!SUB!THIS!
24 /*
25  * IRC - Internet Relay Chat, ircd/version.c
26  * Copyright (C) 1990 Chelsea Ashley Dyerman
27  *
28  * This program is free software; you can redistribute it and/or modify
29  * it under the terms of the GNU General Public License as published by
30  * the Free Software Foundation; either version 1, or (at your option)
31  * any later version.
32  *
33  * This program is distributed in the hope that it will be useful,
34  * but WITHOUT ANY WARRANTY; without even the implied warranty of
35  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
36  * GNU General Public License for more details.
37  *
38  * You should have received a copy of the GNU General Public License
39  * along with this program; if not, write to the Free Software
40  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
41  */
42
43 /*
44  * This file is generated by version.c.SH. Any changes made will go away.
45  */
46
47 #include "version.h"
48 #include "patchlevel.h"
49 #include "patchlist.h"
50
51 const char *generation = "$generation";
52 const char *creation = "$creation";
53 const char *version = BASE_VERSION RELEASE PATCHLEVEL PATCHLIST;
54
55 const char *infotext[] = {
56     "IRC --",
57     "This program is free software; see LICENSE in the distribution",
58     "",
59     "Based on the original code written by Jarkko Oikarinen, version 2.6:",
60     "Wiz          Jarkko Oikarinen         <jto@tolsun.oulu.fi>",
61     "",
62     "The main developer of version u2.9 and u2.10 was:",
63     "Run          Carlo Wood               <carlo@runaway.xs4all.nl>",
64     "",
65     "The head developer of the u2.10 source tree was:",
66     "Bleep        Thomas Helvey            <tomh@inxpress.net>",
67     "",
68     "The current maintainors of the u2.10 source tree are:",
69     "Isomer       Perry Lorier             <perry@coders.net>",
70     "Kev          Kevin Mitchell           <klmitch@mit.edu>",
71     "",
72     "Contributors to this release:",
73     "Kev, Isomer, Gte, Ghostwolf, Bleep",
74     "Debugging and support:",
75     "SeKs, Maniac-, HeKTik, OmniDynmc, Liandrin, Dianora",
76     "Special thanks to Angel and Buff for believing in us and putting"
77     "up with frantic late night phone calls"
78     "",
79     "Thanks goes to all other people who contributed to any version.",
80     "A full listing of all coders can be found in doc/Authors in the",
81     "source.",
82     "",
83     "Sources:",
84 !SUB!THIS!
85
86 for file in ${srcdir}/ircd/*.c ; do
87  if [ `basename $file` != version.c ] ; then
88   echo "    \"[" `./umkpasswd -5 $file` " ]\"," >> version.c
89  fi
90 done
91
92 echo "    \"\"," >> version.c
93 echo "    \"Headers:\"," >> version.c
94
95 for file in ${srcdir}/include/*.h ; do
96  echo "    \"[" `./umkpasswd -5 $file` " ]\"," >> version.c
97 done
98
99 /bin/cat >>version.c <<!SUB!THIS!
100     0,
101 };
102 !SUB!THIS!