271c3a9060
sntp includes a copy of libopts in itself in vendor code, rewrite the Makefile to compile and use only one copy. It is an internal library, not installed. MFC after: 2 weeks
47 lines
630 B
Bash
Executable File
47 lines
630 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
PROG=${1-UNKNOWN}
|
|
|
|
ConfStr="$PROG"
|
|
|
|
ConfStr="$ConfStr 4.2.4p5"
|
|
|
|
case "$CSET" in
|
|
'') ;;
|
|
*) ConfStr="$ConfStr@$CSET" ;;
|
|
esac
|
|
|
|
case "" in
|
|
'')
|
|
case "1" in
|
|
'') ;;
|
|
*) ConfStr="${ConfStr}-a" ;;
|
|
esac
|
|
;;
|
|
*) ConfStr="${ConfStr}-r" ;;
|
|
esac
|
|
|
|
ConfStr="$ConfStr `LC_ALL=C date`"
|
|
|
|
if [ ! -f .version ]; then
|
|
echo 0 > .version
|
|
fi
|
|
RUN="`cat .version`"
|
|
RUN="`expr $RUN + 1`"
|
|
echo $RUN > .version
|
|
|
|
ConfStr="$ConfStr (${RUN})"
|
|
|
|
echo "Version <${ConfStr}>";
|
|
|
|
rm -f version.c
|
|
cat > version.c << -EoF-
|
|
/*
|
|
* version file for $PROG
|
|
*/
|
|
#include <config.h>
|
|
const char * Version = "${ConfStr}";
|
|
-EoF-
|