../include/setup.h ../include/common.h \
../include/sys.h ../include/class.h ../include/dbuf.h \
../include/whowas.h ../include/res.h ../include/numeric.h \
- ../include/patchlevel.h ../include/sock.h ../include/h.h
+ ../include/sock.h ../include/h.h
s_conf.o: s_conf.c ../include/struct.h ../include/config.h \
../include/setup.h ../include/common.h \
../include/sys.h ../include/class.h ../include/dbuf.h \
s_ping.o: s_ping.c ../include/struct.h ../include/config.h \
../include/setup.h ../include/common.h \
../include/sys.h ../include/class.h ../include/dbuf.h \
- ../include/whowas.h ../include/numeric.h ../include/patchlevel.h \
- ../include/sock.h ../include/h.h
+ ../include/whowas.h ../include/numeric.h ../include/sock.h \
+ ../include/h.h
s_serv.o: s_serv.c ../include/struct.h ../include/config.h \
../include/setup.h ../include/common.h \
../include/sys.h ../include/class.h ../include/dbuf.h \
-case $CONFIG in
-'') if test -r ../config.sh
- then
- . ../config.sh ;
- else
- spitshell=cat
- package=IRC
- fi
- ;;
-esac
-
-echo "Extracting $package/ircd/version.c..."
+echo "Extracting version.c..."
if test -r version.c
then
generation=0
fi
+# See if we are compiled from a git working directory
+if test -d ../.git
+then
+ git_version=git-`git describe --abbrev=8 --dirty --always --tags`
+fi
+
generation=`expr $generation + 1`
creation=`date | \
else \
{ print $1 " " $2 " " $3 " " $7 " at " $4 " " $5 " " $6 }}'`
-$spitshell >version.c <<!SUB!THIS!
+cat >version.c <<!SUB!THIS!
/*
* IRC - Internet Relay Chat, ircd/version.c
* Copyright (C) 1990 Chelsea Ashley Dyerman
+ * 2015 Remco Rijnders
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
/*
* This file is generated by version.c.SH. Any changes made will go away.
*/
-
#include "struct.h"
-#include "patchlevel.h"
char *generation = "$generation";
char *creation = "$creation";
-char *version = IRCD_VERSION PATCH1 PATCH2 PATCH3 PATCH4\
- PATCH5 PATCH6 PATCH7 PATCH8 PATCH9;
+#define GIT_VERSION "$git_version"
+char *version = IRCD_VERSION GIT_VERSION;
char *infotext[] =
{
- "$package -- Serenity IRCD " IRCD_VERSION,
+ "Serenity IRCD " IRCD_VERSION GIT_VERSION,
"Based on the original code written by Jarkko Oikarinen",
"Copyright 1988, 1989, 1990, 1991 University of Oulu, Computing Center",
"-",
"Current coders and designers:",
"Remmy - remmy@serenity-irc.net",
"-",
- IRCD_VERSION PATCH1 PATCH2 PATCH3 PATCH4 PATCH5 PATCH6 PATCH7
- PATCH8 PATCH9,
+ IRCD_VERSION GIT_VERSION,
0,
};
!SUB!THIS!