Index: Makefile.in =================================================================== diff -u -rcfa9e21cd56a9d55fb58e6f43d328ecf2e26bfeb -r0ecc82c8627c4cc7e5f008c2032695cee4918f0d --- Makefile.in (.../Makefile.in) (revision cfa9e21cd56a9d55fb58e6f43d328ecf2e26bfeb) +++ Makefile.in (.../Makefile.in) (revision 0ecc82c8627c4cc7e5f008c2032695cee4918f0d) @@ -947,9 +947,9 @@ ) tar: libraries-pkgindex + echo @NSF_COMMIT@ > COMMIT sh $(srcdir)/tclconfig/mktar.sh - .PHONY: all binaries clean depend distclean doc install libraries \ test test-core test-actiweb Index: configure =================================================================== diff -u -rd5c35624e8e858994c421a372211d40903d07255 -r0ecc82c8627c4cc7e5f008c2032695cee4918f0d --- configure (.../configure) (revision d5c35624e8e858994c421a372211d40903d07255) +++ configure (.../configure) (revision 0ecc82c8627c4cc7e5f008c2032695cee4918f0d) @@ -719,6 +719,8 @@ TCL_BIN_DIR TCL_PATCH_LEVEL TCL_VERSION +NSF_COMMIT +git_installed NSF_PATCH_LEVEL NSF_MINOR_VERSION NSF_MAJOR_VERSION @@ -2517,8 +2519,61 @@ -echo "Configuring next Version $PACKAGE_VERSION" +echo "Configuring NSF Version $PACKAGE_VERSION" +# Extract the first word of "git", so it can be a program name with args. +set dummy git; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_git_installed+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$git_installed"; then + ac_cv_prog_git_installed="$git_installed" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_git_installed=""yes"" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_git_installed" && ac_cv_prog_git_installed=""no"" +fi +fi +git_installed=$ac_cv_prog_git_installed +if test -n "$git_installed"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $git_installed" >&5 +$as_echo "$git_installed" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +if test "$git_installed" = "yes" -a -d ".git" ; then + nsf_commit=`git describe --dirty` +elif test -f "COMMIT" ; then + nsf_commit=`cat COMMIT` +else + nsf_commit=`unknown-$PACKAGE_VERSION` +fi + +NSF_COMMIT=$nsf_commit + + +# AC_DEFINE_UNQUOTED([NSF_COMMIT], "$nsf_commit", +# [Commit ID at the time of the last configure run.]) + #-------------------------------------------------------------------- # Load the tclConfig.sh file #-------------------------------------------------------------------- @@ -5692,7 +5747,7 @@ PKG_CFLAGS="$PKG_CFLAGS -DNSF_VERSION=\\\"$NSF_VERSION\\\" -DNSF_PATCHLEVEL=\\\"$NSF_PATCH_LEVEL\\\" \ - $AOL_DEFINES " +-DNSF_COMMIT=\\\"$NSF_COMMIT\\\" $AOL_DEFINES " Index: configure.ac =================================================================== diff -u -rd5c35624e8e858994c421a372211d40903d07255 -r0ecc82c8627c4cc7e5f008c2032695cee4918f0d --- configure.ac (.../configure.ac) (revision d5c35624e8e858994c421a372211d40903d07255) +++ configure.ac (.../configure.ac) (revision 0ecc82c8627c4cc7e5f008c2032695cee4918f0d) @@ -104,8 +104,24 @@ AC_SUBST([NSF_MINOR_VERSION]) AC_SUBST([NSF_PATCH_LEVEL]) -echo "Configuring next Version $PACKAGE_VERSION" +echo "Configuring NSF Version $PACKAGE_VERSION" +AC_CHECK_PROG(git_installed,git,"yes", "no") + +if test "$git_installed" = "yes" -a -d ".git" ; then + nsf_commit=`git describe --dirty` +elif test -f "COMMIT" ; then + nsf_commit=`cat COMMIT` +else + nsf_commit=`unknown-$PACKAGE_VERSION` +fi + +NSF_COMMIT=$nsf_commit +AC_SUBST([NSF_COMMIT]) + +# AC_DEFINE_UNQUOTED([NSF_COMMIT], "$nsf_commit", +# [Commit ID at the time of the last configure run.]) + #-------------------------------------------------------------------- # Load the tclConfig.sh file #-------------------------------------------------------------------- @@ -226,7 +242,7 @@ TEA_ADD_INCLUDES([]) TEA_ADD_LIBS([]) TEA_ADD_CFLAGS([-DNSF_VERSION=\\\"$NSF_VERSION\\\" -DNSF_PATCHLEVEL=\\\"$NSF_PATCH_LEVEL\\\" \ - $AOL_DEFINES ]) +-DNSF_COMMIT=\\\"$NSF_COMMIT\\\" $AOL_DEFINES ]) TEA_ADD_STUB_SOURCES([nsfStubLib.c]) TEA_ADD_TCL_SOURCES([]) Index: generic/nsfDebug.c =================================================================== diff -u -r9238ec9d4886db0f3c2c903cb19042aaca35b31f -r0ecc82c8627c4cc7e5f008c2032695cee4918f0d --- generic/nsfDebug.c (.../nsfDebug.c) (revision 9238ec9d4886db0f3c2c903cb19042aaca35b31f) +++ generic/nsfDebug.c (.../nsfDebug.c) (revision 0ecc82c8627c4cc7e5f008c2032695cee4918f0d) @@ -66,6 +66,7 @@ nonnull_assert(interp != NULL); Tcl_SetVar(interp, "::nsf::version", NSF_VERSION, TCL_GLOBAL_ONLY); + Tcl_SetVar(interp, "::nsf::commit", NSF_COMMIT, TCL_GLOBAL_ONLY); Tcl_SetVar(interp, "::nsf::patchLevel", NSF_PATCHLEVEL, TCL_GLOBAL_ONLY); Tcl_SetVar(interp, "::nsf::config(development)",