refine the list of source files a bit; include CVS version information
authorKevin L. Mitchell <klmitch@mit.edu>
Wed, 1 Aug 2007 22:28:21 +0000 (22:28 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Wed, 1 Aug 2007 22:28:21 +0000 (22:28 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1821 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ircd/version.c.SH

index 37518cde94420a9c7a2cd9e8307b0737e26c2e28..f318bb5f91558a401ba1f85af0c1a37a3eb1a18a 100644 (file)
@@ -1,5 +1,7 @@
 #! /bin/sh
 
+# $Id$
+
 echo "Extracting ircd/version.c ..."
 
 srcdir=$1
@@ -83,9 +85,13 @@ const char *infotext[] = {
     "Sources:",
 !SUB!THIS!
 
-for file in ${srcdir}/ircd/*.c ; do
- if [ `basename $file` != version.c ] ; then
-  echo "    \"[" `./umkpasswd -5 $file` " ]\"," >> version.c
+for file in ${srcdir}/ircd/*.[cly] ${srcdir}/ircd/version.c.SH ; do
+ base=`basename $file`
+ if [ $base != version.c -a $base != y.tab.c -a $base != lex.yy.c -a \
+      $base != chattr.tab.c ] ; then
+  vers=`grep '$Id' $file | sed -e 's/.*\$Id$[^$]*//' | \
+       awk '{ print $2; exit; }'`
+  echo "    \"[" `./umkpasswd -5 $file` " $vers ]\"," >> version.c
  fi
 done
 
@@ -93,7 +99,9 @@ echo "    \"\"," >> version.c
 echo "    \"Headers:\"," >> version.c
 
 for file in ${srcdir}/include/*.h ; do
- echo "    \"[" `./umkpasswd -5 $file` " ]\"," >> version.c
+ vers=`grep '$Id' $file | sed -e 's/.*\$Id$[^$]*//' | \
+       awk '{ print $2; exit; }'`
+ echo "    \"[" `./umkpasswd -5 $file` " $vers ]\"," >> version.c
 done
 
 /bin/cat >>version.c <<!SUB!THIS!