mkver.in revision 106163
1#!@PATH_SH@ 2PROG=${1-UNKNOWN} 3 4ConfStr="$PROG" 5 6ConfStr="$ConfStr @VERSION@" 7 8case "$CSET" in 9 '') ;; 10 *) ConfStr="$ConfStr@$CSET" ;; 11esac 12 13case "@LIBRSAREF@" in 14 '') 15 case "@AUTOKEY@" in 16 '') ;; 17 *) ConfStr="${ConfStr}-a" ;; 18 esac 19 ;; 20 *) ConfStr="${ConfStr}-r" ;; 21esac 22 23ConfStr="$ConfStr `LC_TIME=C date`" 24 25if [ ! -f .version ]; then 26 echo 0 > .version 27fi 28RUN="`cat .version`" 29RUN="`expr $RUN + 1`" 30echo $RUN > .version 31 32ConfStr="$ConfStr (${RUN})" 33 34echo "Version <${ConfStr}>"; 35 36rm -f version.c 37cat > version.c << -EoF- 38/* 39 * version file for $PROG 40 */ 41#include <config.h> 42const char * Version = "${ConfStr}"; 43-EoF- 44