PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/contrib/ntp/scripts/mkver.in

https://bitbucket.org/freebsd/freebsd-head/
Autoconf | 38 lines | 28 code | 8 blank | 2 comment | 2 complexity | 21d80d98126bb772f18e6b3562d7249f MD5 | raw file
 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 "@LCRYPTO@" in
14 '') ;;
15 -lcrypto)
16    ConfStr="${ConfStr}-o" ;;
17 *) ConfStr="${ConfStr}-?" ;;
18esac
19
20if [ ! -f .version ]; then
21  echo 0 > .version
22fi
23RUN="`cat .version`"
24RUN="`expr $RUN + 1`"
25echo $RUN > .version
26
27ConfStr="$ConfStr (${RUN})"
28
29echo "Version <${ConfStr}>";
30
31rm -f version.c
32cat > version.c << -EoF-
33/*
34 * version file for $PROG
35 */
36#include <config.h>
37const char * Version = "${ConfStr}";
38-EoF-