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
28 echo "rebuild the missing files for compilation"
29 if [ ! -e configure ] ; then
32 if [ ! -e Makefile ] ; then
33 # Disable compilation optim to make it built faster
34 ./configure --enable-maintainer-mode --disable-compile-optimizations
36 echo "Make the archive"
39 echo "Copy the archive in position"
40 mkdir -p ${SIMGRID_BASEDIR}
41 mv ${version}.tar.gz ${SIMGRID_BASEDIR}
43 echo "${SIMGRID_BASEDIR}/${version}.tar.gz already exists. Don't rebuild"
47 # clean_node: remove everything about this node
51 # OS specific working directory
52 BUILDDIR=${SIMGRID_BASEDIR}/$OS/$node/$version
55 # Clean any leftover from previous install
56 if [ -e $BUILDDIR ] ; then
57 echo "remove old directory $BUILDDIR"
63 # open_archive: wait for archive to be built, cleanup previous
69 tar xfz ${SIMGRID_BASEDIR}/${version}.tar.gz