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
10 version="simgrid-3.3.4-svn-r"`svnversion`
15 # wait_archive: wait until the archive gets defined into the right position
17 while [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; do
18 echo ${SIMGRID_BASEDIR}/${version}.tar.gz not found. Wait five seconds.
23 # make_dist: rebuild an archive from the svn
26 if [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; then
27 cd ${SIMGRID_SVN_ROOT}
28 echo "rebuild the missing files for compilation"
29 if [ ! -e configure ] ; then
32 # Reconfigure in any case or the svn version won't get updated
33 # (disable compilation optim to make it built faster)
34 ./configure --enable-maintainer-mode --disable-compile-optimizations
35 echo "Make the archive"
38 echo "Copy the archive in position"
39 mkdir -p ${SIMGRID_BASEDIR}
40 mv ${version}.tar.gz ${SIMGRID_BASEDIR}
42 echo "${SIMGRID_BASEDIR}/${version}.tar.gz already exists. Don't rebuild"
46 # clean_node: remove everything about this node
50 # OS specific working directory
51 BUILDDIR=${SIMGRID_BASEDIR}/$OS/$node/$version
54 # Clean any leftover from previous install
55 if [ -e $BUILDDIR ] ; then
56 echo "remove old directory $BUILDDIR"
62 # open_archive: wait for archive to be built, cleanup previous
68 tar xfz ${SIMGRID_BASEDIR}/${version}.tar.gz