#!/bin/sh
#
#	Create a strings with compile date, RCS ID's,
#	etc.
#

#	$Header: /usr/home/pilot/gypsy-1.6/RCS/make_versions.sh,v 1.7 1999/05/12 08:48:05 paul Exp $
#
#	$Log: make_versions.sh,v $
#	Revision 1.7  1999/05/12 08:48:05  paul
#	Ready for release as Gypsy 1.4.  Major changes include:
#	*  Rudimentary track/route buffer to transfer data between GPS
#	   and PC (a'la gps2p2pc)
#	*  Protocol fix for DLE escaping bug
#	*  Code changes from <andre@drfmc.ceng.cea.fr> to be able to
#	   compile a PalmOS2 version
#	*  Garmin protocol tries a bit harder to recover from comms
#	   errors (but is still *very* dumb)
#
#

/bin/echo "// automatically generated by $0" > versions.c
/bin/echo >> versions.c

date=`date "+%d %h %y\\\\t%H:%M:%S"`
/bin/echo "char *compile_date = \"$date\";" >> versions.c

/bin/echo -n "char *version_info = \"" >> versions.c

for f in gps.c garmin.c file.c host.c; do
   rcs=`grep -i 'static char \*rcs_id' $f | \
	sed -e 's/.*\.c,v //' -e 's/ .*//'`
   if [ `echo $f | wc -c` -lt 8 ]; then
      /bin/echo -n "$f\\t\\t$rcs\\n" >> versions.c
   else
      /bin/echo -n "$f\\t$rcs\\n" >> versions.c
   fi
done
/bin/echo "\";" >> versions.c
