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
13 version="simgrid-3.3.4-svn-r"`svnversion`
15 version="simgrid-3.3.4-svn-r"`head -n 4 .svn/entries |tail -n 1`
18 else if [ -e .git ] ; then
19 version="simgrid-3.3.4-git-r"`git log --oneline -1 | sed 's| .*||'`
25 # wait_archive: wait until the archive gets defined into the right position
27 while [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; do
28 echo ${SIMGRID_BASEDIR}/${version}.tar.gz not found. Wait five seconds.
33 # make_dist: rebuild an archive from the svn
36 if [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; then
37 cd ${SIMGRID_SVN_ROOT}
38 echo "rebuild the missing files for compilation"
39 if [ ! -e configure ] ; then
42 # Reconfigure in any case or the svn version won't get updated
43 # (disable compilation optim to make it built faster)
44 ./configure --enable-maintainer-mode --disable-compile-optimizations
45 echo "Make the archive"
46 make -C src libgras.la
50 echo "Copy the archive in position"
51 mkdir -p ${SIMGRID_BASEDIR}
52 mv ${version}.tar.gz ${SIMGRID_BASEDIR}
54 echo "${SIMGRID_BASEDIR}/${version}.tar.gz already exists. Don't rebuild"
58 # clean_node: remove everything about this node
62 # OS specific working directory
63 BUILDDIR=${SIMGRID_BASEDIR}/$OS/$node/$version
66 # Clean any leftover from previous install
67 if [ -e $BUILDDIR ] ; then
68 echo "remove old directory $BUILDDIR"
74 # open_archive: wait for archive to be built, cleanup previous
80 tar xfz ${SIMGRID_BASEDIR}/${version}.tar.gz