From ccde0c6c098524ebb532315f846bc0953c7c1e62 Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 26 Sep 2006 13:50:10 +0000 Subject: [PATCH] construct a build identifier string, and use it to populate stamp files. It should allow future graspe optimizations (allowing to recompile only when it's really needed for example) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2825 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- Makefile.am | 9 ++++----- configure.ac | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Makefile.am b/Makefile.am index 50bdd7a344..35d20da810 100644 --- a/Makefile.am +++ b/Makefile.am @@ -16,11 +16,10 @@ DISTCLEANFILES = *~ ACLOCAL = aclocal-1.9 -I acmacro AUTOMAKE_OPTIONS = gnu -SOURCE_FILES = $(shell find . -name "*.[ch]") -TAGS: $(SOURCE_FILES) - @etags $(SOURCE_FILES) - -tags: TAGS +check-local: + echo @build_id@ > stamp.check +all-local: + echo @build_id@ > stamp.build gramine: rm -rf gramine-@VERSION@ gramine-@VERSION@.tar* diff --git a/configure.ac b/configure.ac index 6fba521ea9..35410a2552 100644 --- a/configure.ac +++ b/configure.ac @@ -19,8 +19,6 @@ ACLOCAL="$ACLOCAL -I acmacro" AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL - -AC_SUBST(ac_configure_args) ############### ## System checks ## @@ -263,6 +261,18 @@ if test x$ADDR2LINE != x ; then AC_DEFINE_UNQUOTED(ADDR2LINE,"$ADDR2LINE",[Path to the addr2line tool]) fi +AC_SUBST(ac_configure_args) +# Can we make status line about the compilation result? +AC_CHECK_PROG(MD5SUM,md5sum,`which md5sum`) +if test x$MD5SUM != xno ; then + build_version=`find -name '*.[ch]' |grep -v src/ucontext_stack.h | grep -v src/gras_config.h |\ + xargs cat| $MD5SUM | sed 's/ .*$//'` +else + build_version="no_md5sum_binary" +fi +build_id="$PACKAGE ver=$VERSION build=$build_version args=\"$ac_configure_args\"" +AC_SUBST(build_id) + ################### ## Makes the output ## @@ -386,5 +396,6 @@ if test -e CVS && test x$USE_MAINTAINER_MODE != xyes ; then echo "WARNING: ./configure --enable-maintainer-mode $ac_configure_args" echo "WARNING:" fi +echo $build_id > stamp.configure exit 0; -- 2.20.1