2006-01-30 16:04:19 -05:00
|
|
|
#!/bin/sh
|
2006-01-06 12:46:49 -05:00
|
|
|
|
2006-08-28 22:42:27 -04:00
|
|
|
if [ -f .noversion ] ; then
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2006-05-08 00:10:21 -04:00
|
|
|
if eval test x${1} = xforce ; then
|
2006-01-06 12:46:49 -05:00
|
|
|
rm -f .version
|
|
|
|
fi
|
|
|
|
|
2006-01-27 16:33:45 -05:00
|
|
|
force=0
|
2006-01-06 12:46:49 -05:00
|
|
|
version=`svnversion . -n || echo hacked`
|
|
|
|
oldversion=`cat .version 2>/dev/null || echo "0"`
|
2006-01-27 16:33:45 -05:00
|
|
|
grep "@SVN_VERSION@" src/include/switch_version.h && force=1
|
2006-01-06 12:46:49 -05:00
|
|
|
|
2006-01-27 16:33:45 -05:00
|
|
|
if [ $oldversion != $version ] || [ $force = 1 ] ; then
|
2006-01-06 12:46:49 -05:00
|
|
|
cat src/include/switch_version.h.in | sed "s/@SVN_VERSION@/$version/g" > src/include/switch_version.h
|
|
|
|
echo $version > .version
|
2006-09-30 03:44:25 -04:00
|
|
|
if [ -z "$MAKE" ] ; then
|
|
|
|
make=`which gmake 2>/dev/null`
|
|
|
|
if [ -z "$MAKE" ] ; then
|
|
|
|
make=make
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
$MAKE modclean
|
2006-01-06 12:46:49 -05:00
|
|
|
fi
|