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"
40 echo "Copy the archive in position"
41 mkdir -p ${SIMGRID_BASEDIR}
42 mv ${version}.tar.gz ${SIMGRID_BASEDIR}
44 echo "${SIMGRID_BASEDIR}/${version}.tar.gz already exists. Don't rebuild"
48 # clean_node: remove everything about this node
52 # OS specific working directory
53 BUILDDIR=${SIMGRID_BASEDIR}/$OS/$node/$version
56 # Clean any leftover from previous install
57 if [ -e $BUILDDIR ] ; then
58 echo "remove old directory $BUILDDIR"
64 # open_archive: wait for archive to be built, cleanup previous
70 tar xfz ${SIMGRID_BASEDIR}/${version}.tar.gz