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
14 ${SIMGRID_SVN_ROOT}/buildtools/scripts/change-svn-wc-format.py ${SIMGRID_SVN_ROOT} 1.4
18 version="simgrid-3.3.4-svn-r"`svnversion`
19 else if [ -e .git ] ; then
20 version="simgrid-3.3.4-git-r"`git log --oneline -1 | sed 's| .*||'`
26 # wait_archive: wait until the archive gets defined into the right position
28 while [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; do
29 echo ${SIMGRID_BASEDIR}/${version}.tar.gz not found. Wait five seconds.
34 # make_dist: rebuild an archive from the svn
37 if [ ! -e ${SIMGRID_BASEDIR}/${version}.tar.gz ] ; then
38 cd ${SIMGRID_SVN_ROOT}
39 echo "rebuild the missing files for compilation"
40 if [ ! -e configure ] ; then
43 # Reconfigure in any case or the svn version won't get updated
44 # (disable compilation optim to make it built faster)
45 ./configure --enable-maintainer-mode --disable-compile-optimizations
46 echo "Make the archive"
48 make -C src libgras.la
52 echo "Copy the archive in position"
53 mkdir -p ${SIMGRID_BASEDIR}
54 mv ${version}.tar.gz ${SIMGRID_BASEDIR}
56 echo "${SIMGRID_BASEDIR}/${version}.tar.gz already exists. Don't rebuild"
60 # clean_node: remove everything about this node
64 # OS specific working directory
65 BUILDDIR=${SIMGRID_BASEDIR}/$OS/$node/$version
68 # Clean any leftover from previous install
69 if [ -e $BUILDDIR ] ; then
70 echo "remove old directory $BUILDDIR"
76 # open_archive: wait for archive to be built, cleanup previous
82 tar xfz ${SIMGRID_BASEDIR}/${version}.tar.gz