1 # This file defines a bunch of useful functions to automatize the build of SimGrid.
5 # get_version: define the version number of the svn into a version variable
7 if [ x$version = x ] ; then
11 version="simgrid-3.3.4-svn-r"`svnversion`
12 else if [ -e .git ] ; then
13 version="simgrid-3.3.4-git-r"`git log --oneline -1 | sed 's| .*||'`
19 # wait_archive: wait until the archive gets defined into the right position
21 while [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; do
22 echo ${SIMGRID_BASEDIR}/${version}.tar.gz not found. Wait five seconds.
27 # make_dist: rebuild an archive from the svn
30 if [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; then
31 cd ${SIMGRID_SVN_ROOT}
32 echo "rebuild the missing files for compilation"
33 if [ ! -e configure ] ; then
36 # Reconfigure in any case or the svn version won't get updated
37 # (disable compilation optim to make it built faster)
38 ./configure --enable-maintainer-mode --disable-compile-optimizations
39 echo "Make the archive"
44 echo "Copy the archive in position"
45 mkdir -p ${SIMGRID_BASEDIR}
46 mv ${version}.tar.gz ${SIMGRID_BASEDIR}
48 echo "${SIMGRID_BASEDIR}/${version}.tar.gz already exists. Don't rebuild"
52 # clean_node: remove everything about this node
56 # OS specific working directory
57 BUILDDIR=${SIMGRID_BASEDIR}/$OS/$node/$version
60 # Clean any leftover from previous install
61 if [ -e $BUILDDIR ] ; then
62 echo "remove old directory $BUILDDIR"
68 # open_archive: wait for archive to be built, cleanup previous
74 tar xfz ${SIMGRID_BASEDIR}/${version}.tar.gz