Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
construct a build identifier string, and use it to populate stamp files. It should...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 26 Sep 2006 13:50:10 +0000 (13:50 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 26 Sep 2006 13:50:10 +0000 (13:50 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2825 48e7efb5-ca39-0410-a469-dd3cf9ba447f

Makefile.am
configure.ac

index 50bdd7a..35d20da 100644 (file)
@@ -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*
index 6fba521..35410a2 100644 (file)
@@ -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;