Commit f9980c85 authored by Ian Romanick's avatar Ian Romanick
Browse files

Eliminiate remaining bits xgi_ver.h cruft.

parent 9d9c5718
......@@ -60,7 +60,6 @@ xgi_drv_la_SOURCES = \
xgi_setup.c \
xgi_vb.c \
xgi_vb.h \
xgi_ver.h \
xgi_vga.c \
xgi_video.c \
xgi_video.h \
......
#!/bin/sh
verinfo=ver.info
if [ ! -f $verinfo ] ; then
echo "Cannot find $verinfo, mkdrv fail." 1>&2
exit
fi
Version=`grep '^Version: ' "$verinfo"`
if [ "$Version" == "" ] ; then
echo 'Cannot find legal version string.' 1>&2
echo 'There must be a line with format "Version: 1.0.0"' 1>&2
exit
fi
Version="`echo $Version | sed 's/[ ][ ]*$//g'`"
Version="`echo $Version | sed 's/^[ ][ ]*//g'`"
Version="`echo $Version | sed 's/[ ][ ]*/ /g'`"
VER=`echo $Version| sed 's/^Version:[ ]*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[ ]*$/\1/g'`
if [ "$VER" == "$Version" ] ; then
echo 'Version string "'$Version'" is in illegal format.' 1>&2
echo 'There must be a line with format "Version: 1.0.0"' 1>&2
exit
fi
XGI_MAJOR_VERSION=`echo $VER| sed 's/^\(.*\)\..*\..*$/\1/g'`
XGI_MINOR_VERSION=`echo $VER| sed 's/^.*\.\(.*\)\..*$/\1/g'`
XGI_PATCHLEVEL=`echo $VER| sed 's/^.*\..*\.\(.*\)$/\1/g'`
XGIDRIVERVERSIONYEAR=`date +%y | bc`
XGIDRIVERVERSIONMONTH=`date +%m | bc`
XGIDRIVERVERSIONDAY=`date +%d | bc`
XGIDRIVERREVISION=1
######################################################################
# Create version include file.
######################################################################
echo "/*****************************************************" > xgi_ver.h
echo " * xgi_ver.h" >> xgi_ver.h
echo " * Generated from mkdrv shell script." >> xgi_ver.h
echo " *" >> xgi_ver.h
echo " *" >> xgi_ver.h
echo " *" >> xgi_ver.h
date +" * Generate by %Y/%m/%d" >> xgi_ver.h
echo " *****************************************************/" >> xgi_ver.h
echo '' >> xgi_ver.h
echo '' >> xgi_ver.h
echo '' >> xgi_ver.h
echo "#define XGI_MAJOR_VERSION ${XGI_MAJOR_VERSION}" >> xgi_ver.h
echo "#define XGI_MINOR_VERSION ${XGI_MINOR_VERSION}" >> xgi_ver.h
echo "#define XGI_PATCHLEVEL ${XGI_PATCHLEVEL}" >> xgi_ver.h
echo '' >> xgi_ver.h
echo "#define XGIDRIVERVERSIONYEAR ${XGIDRIVERVERSIONYEAR}" >> xgi_ver.h
echo "#define XGIDRIVERVERSIONMONTH ${XGIDRIVERVERSIONMONTH}" >> xgi_ver.h
echo "#define XGIDRIVERVERSIONDAY ${XGIDRIVERVERSIONDAY}" >> xgi_ver.h
echo "#define XGIDRIVERREVISION ${XGIDRIVERREVISION}" >> xgi_ver.h
######################################################################
#find . \( -type f \) -exec dos2unix {} {} \;
make Makefile
make clean
make xgi_drv.o
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment