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
12 version="simgrid-3.3.4-svn-r"`svnversion`
14 version="simgrid-3.3.4-svn-r"`head -n 4 .svn/entries |tail -n 1`
16 else if [ -e .git ] ; then
17 version="simgrid-3.3.4-git-r"`git log --oneline -1 | sed 's| .*||'`
23 # wait_archive: wait until the archive gets defined into the right position
25 while [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; do
26 echo ${SIMGRID_BASEDIR}/${version}.tar.gz not found. Wait five seconds.
31 # make_dist: rebuild an archive from the svn
34 if [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; then
35 cd ${SIMGRID_SVN_ROOT}
36 echo "rebuild the missing files for compilation"
37 if [ ! -e configure ] ; then
40 # Reconfigure in any case or the svn version won't get updated
41 # (disable compilation optim to make it built faster)
42 ./configure --enable-maintainer-mode --disable-compile-optimizations
43 echo "Make the archive"
44 make -C src libgras.la
48 echo "Copy the archive in position"
49 mkdir -p ${SIMGRID_BASEDIR}
50 mv ${version}.tar.gz ${SIMGRID_BASEDIR}
52 echo "${SIMGRID_BASEDIR}/${version}.tar.gz already exists. Don't rebuild"
56 # clean_node: remove everything about this node
60 # OS specific working directory
61 BUILDDIR=${SIMGRID_BASEDIR}/$OS/$node/$version
64 # Clean any leftover from previous install
65 if [ -e $BUILDDIR ] ; then
66 echo "remove old directory $BUILDDIR"
72 # open_archive: wait for archive to be built, cleanup previous
78 tar xfz ${SIMGRID_BASEDIR}/${version}.tar.gz