#!/bin/sh -e

# $Id: setversion,v 1.4 2006-05-23 09:11:23 flux Exp $

# called in bootstrap

# be verbose
set -x

TAG=1.004

VERSION=`date '+%y-%j'`
echo $VERSION > VERSION

cat > configure.ac <<EOT
# configure.ac - generated from configure.ac.in by setversion. do not edit
# configure.ac, but edit the master.
EOT

sed "s/setversion_VERSION/$VERSION/" configure.ac.in >> configure.ac

# echo '#include "version.h"' > src/version.c
echo 'const char *apxDateTag = "'$VERSION'";' > src/version.c
echo 'const char *apxNumTag = "'$TAG'";' >> src/version.c

echo $TAG      >  doc/stamp.tag
date '+%y-%j'  >  doc/stamp.stamp
date '+%e'     >  doc/stamp.day
date '+%b'     >  doc/stamp.month
date '+%Y'     >  doc/stamp.year

