/TAGS
/NTLang.bat
/golast.bat
+/.version
# Destination build directories
/alpha_nbsd*
--- /dev/null
+#!/bin/sh
+
+version_file=$1
+
+if [ -f $version_file ] ; then
+ git_version=`cat $version_file`
+else
+ if which git > /dev/null; then
+ git_version=`git describe --abbrev=4 HEAD 2>/dev/null`
+
+ # Is the working tree dirty?
+ if ! git diff-index --quiet --cached HEAD --ignore-submodules || \
+ ! git diff-files --quiet --ignore-submodules ; then
+ git_version="$git_version-dirty"
+ fi
+ else
+ git_version=UNKNOWN
+ fi
+fi
+
+echo "$git_version" | sed -e 's/openafs-[^-]*-//' -e 's/_/./g' | tr -d '\012'
--- /dev/null
+git-version
AC_PRERQ([2.60])
-AC_INIT([OpenAFS], [1.5.74.1])
+AC_INIT([OpenAFS], m4_esyscmd([build-tools/git-version .version]))
AC_CONFIG_SRCDIR(src/libafs/Makefile.common.in)
AM_INIT_AUTOMAKE
AC_PREREQ([2.60])
-AC_INIT([OpenAFS], [1.5.74.1])
+AC_INIT([OpenAFS], m4_esyscmd([build-tools/git-version .version]))
AC_CONFIG_SRCDIR([src/config/stds.h])
AM_INIT_AUTOMAKE
# directory or online at http://www.openafs.org/dl/license10.html
PACKAGE=@PACKAGE@
-VERSION=@VERSION@
AFS_component_version_number.o: AFS_component_version_number.c
AFS_component_version_number.c: @TOP_OBJDIR@/src/config/Makefile.version
- echo 'char cml_version_number[]="@(#) OpenAFS ${VERSION} built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c
- echo 'char* AFSVersion = "${PACKAGE} ${VERSION}"; ' >>AFS_component_version_number.c
+ VERSION=`@abs_top_srcdir@/build-tools/git-version @abs_top_srcdir@/.version` && \
+ echo 'char cml_version_number[]="@(#) OpenAFS '$$VERSION' built ' `date +"%Y-%m-%d"` '";' >AFS_component_version_number.c && \
+ echo 'char* AFSVersion = "${PACKAGE} '$$VERSION'";' >>AFS_component_version_number.c
version.xml:
- echo '<?xml version="1.0" encoding="UTF-8"?>' >version.xml
- echo '<revision>' >>version.xml
- echo '<revnumber>${VERSION}</revnumber>' >>version.xml
+ VERSION=`@abs_top_srcdir@/build-tools/git-version @abs_top_srcdir/.version` && \
+ echo '<?xml version="1.0" encoding="UTF-8"?>' >version.xml && \
+ echo '<revision>' >>version.xml && \
+ echo '<revnumber>'$$VERSION'</revnumber>' >>version.xml && \
echo '</revision>' >>version.xml
version.txt:
©it("$projdir/src/libafs/MakefileProto.$ostype.in",
"$treedir/src/libafs/MakefileProto.in");
+$showonly || system("$projdir/build-tools/git-version $projdir/.version > $treedir/.version");
+
# We need to regenerate this to support building amd64 kernels from a
# libafs_tree built on i386.
unlink("$treedir/include/afs/param.h");