2006-01-30 21:04:19 +00:00
|
|
|
#!/bin/sh
|
2006-01-06 17:46:49 +00:00
|
|
|
|
2006-08-29 02:42:27 +00:00
|
|
|
if [ -f .noversion ] ; then
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2006-05-08 04:10:21 +00:00
|
|
|
if eval test x${1} = xforce ; then
|
2006-01-06 17:46:49 +00:00
|
|
|
rm -f .version
|
|
|
|
fi
|
|
|
|
|
2006-01-27 21:33:45 +00:00
|
|
|
force=0
|
2006-01-06 17:46:49 +00:00
|
|
|
version=`svnversion . -n || echo hacked`
|
|
|
|
oldversion=`cat .version 2>/dev/null || echo "0"`
|
2006-01-27 21:33:45 +00:00
|
|
|
grep "@SVN_VERSION@" src/include/switch_version.h && force=1
|
2006-01-06 17:46:49 +00:00
|
|
|
|
2006-01-27 21:33:45 +00:00
|
|
|
if [ $oldversion != $version ] || [ $force = 1 ] ; then
|
2006-01-06 17:46:49 +00: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 07:44:25 +00:00
|
|
|
if [ -z "$MAKE" ] ; then
|
|
|
|
make=`which gmake 2>/dev/null`
|
|
|
|
if [ -z "$MAKE" ] ; then
|
|
|
|
make=make
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
$MAKE modclean
|
2006-01-06 17:46:49 +00:00
|
|
|
fi
|