Commit 86dba704469dbaf1c548bc9a56e07e5e85dd7ef1
1 parent
d7db3166
Include version number in directory name
Showing
1 changed file
with
22 additions
and
30 deletions
gammalib.sh
| 1 | 1 | #! /bin/bash -f |
| 2 | 2 | |
| 3 | -# Parameters | |
| 4 | -sourcedir=gammalib | |
| 3 | +# Set parameters | |
| 5 | 4 | installdir=$(pwd)/build |
| 6 | 5 | makedoc="no" |
| 7 | 6 | |
| 8 | -echo "Remove existing folder" | |
| 9 | -rm -rf $sourcedir | |
| 10 | -#rm -rf $installdir | |
| 11 | - | |
| 12 | 7 | echo "Checkout latest GammaLib" |
| 8 | +rm -rf gammalib | |
| 13 | 9 | cvs -Q -d /home/cvs export -N -r HEAD "gammalib" |
| 14 | -rm -rf $sourcedir/inst/lat/test/data/ft2.fits.gz | |
| 15 | 10 | |
| 11 | +# Extract version number | |
| 12 | +version=`cat gammalib/configure.ac | grep 'AC_INIT' | awk -F"[" '{print $3}' | sed 's/],//' | sed 's/\./ /g'` | |
| 13 | +version=`printf "%2.2d-%2.2d-%2.2d" $version` | |
| 14 | +echo "GammaLib version: "$version | |
| 15 | + | |
| 16 | +# Set source directory | |
| 17 | +sourcedir=gammalib-$version | |
| 18 | +rm -rf $sourcedir | |
| 19 | +mv gammalib $sourcedir | |
| 20 | + | |
| 21 | +# | |
| 16 | 22 | echo "Create Makefile.in and configure scripts" |
| 17 | 23 | cd $sourcedir |
| 18 | -# | |
| 19 | 24 | ./autogen.sh |
| 20 | -#aclocal -I m4 | |
| 21 | -#libtoolize --copy | |
| 22 | -#autoconf | |
| 23 | -#autoheader | |
| 24 | -#automake --add-missing --copy | |
| 25 | -# | |
| 26 | -#rm -f autogen.sh | |
| 27 | -#rm -rf m4 | |
| 28 | -#rm -rf autom4te.cache | |
| 29 | -#rm -f configure.ac | |
| 30 | -#rm -f Makefile.am | |
| 31 | 25 | rm -f gammalib.sh |
| 32 | -# | |
| 33 | 26 | cd .. |
| 34 | 27 | |
| 28 | +# | |
| 35 | 29 | echo "Create gammalib_wrap.cpp and gammalib.py files for python binding (making swig obsolete)" |
| 36 | 30 | inc_inst="-I$sourcedir/inst/mwl/pyext -I$sourcedir/inst/lat/pyext -I$sourcedir/inst/cta/pyext" |
| 37 | 31 | opt_inst="-DWITH_INST_MWL -DWITH_INST_LAT -DWITH_INST_CTA" |
| 38 | 32 | swig -c++ -python -Wall -includeall -I$sourcedir/src $inc_inst $opt_inst -o $sourcedir/pyext/gammalib_wrap.cpp -outdir $sourcedir/pyext $sourcedir/pyext/gammalib.i |
| 39 | 33 | |
| 34 | +# | |
| 40 | 35 | if [ "x$makedoc" == "xyes" ] ; then |
| 41 | 36 | echo "Create doxygen documentation" |
| 42 | - cd gammalib/doc | |
| 37 | + cd $sourcedir/doc | |
| 43 | 38 | doxygen Doxyfile |
| 44 | 39 | cd latex |
| 45 | 40 | make |
| ... | ... | @@ -49,8 +44,9 @@ if [ "x$makedoc" == "xyes" ] ; then |
| 49 | 44 | cd ../.. |
| 50 | 45 | fi |
| 51 | 46 | |
| 47 | +# | |
| 52 | 48 | echo "Create LaTeX documentation" |
| 53 | -cd gammalib/doc | |
| 49 | +cd $sourcedir/doc | |
| 54 | 50 | # |
| 55 | 51 | latex gammalib_um.tex |
| 56 | 52 | dvips gammalib_um.dvi -o gammalib_um.ps |
| ... | ... | @@ -103,23 +99,19 @@ tar cvf - $sourcedir > $sourcedir.tar |
| 103 | 99 | rm -f $sourcedir.tar.gz |
| 104 | 100 | gzip $sourcedir.tar |
| 105 | 101 | |
| 102 | +# | |
| 106 | 103 | echo "Configure GammaLib" |
| 107 | 104 | cd $sourcedir |
| 108 | -#./autogen.sh | |
| 109 | 105 | ./configure --prefix=$installdir |
| 110 | 106 | |
| 107 | +# | |
| 111 | 108 | echo "Compile GammaLib" |
| 112 | 109 | make -j10 |
| 113 | 110 | |
| 114 | -#echo "Install GammaLib" | |
| 115 | -#make install | |
| 116 | - | |
| 111 | +# | |
| 117 | 112 | echo "Check GammaLib" |
| 118 | -#export PATH=$installdir/bin:$PATH | |
| 119 | -#export LD_LIBRARY_PATH=$installdir/lib:$LD_LIBRARY_PATH | |
| 120 | -#export PYTHONPATH=$installdir/lib/python2.5/site-packages:$PYTHONPATH | |
| 121 | 113 | make check |
| 122 | 114 | |
| 115 | +# | |
| 123 | 116 | echo "Install GammaLib" |
| 124 | 117 | make install |
| 125 | - | ... | ... |