Revision e716dd1375611177a439ba45f0db033a7ab8f48f authored by Peter Teuben on 26 December 2004, 03:24:46 UTC, committed by Peter Teuben on 26 December 2004, 03:24:46 UTC
1 parent ecde2e6
Raw File
AAA_SOURCE_ME
#
# Source this file to install and build NEMO from scratch ("manybody method")
#
# This script also supports building with the PGPLOT and CFITSIO packages that
# have to be in NEMO/local to be triggered. Here is an example how to do this:
#
#	cvs -Q co nemo
#	cd nemo
#	mkdir local
#       cd local; cvs -Q co pgplot; cd ..
#       cd local; wget -q ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio2500.tar.gz
#       tar zxf cfitsio2500.tar.gz
#       cd ..
#
# after this the install can be done as follows (your shell must be (t)csh !!)
#
#       source AAA_SOURCE_ME
#
# to clean up the closest approach is:
#
#	make distclean          # cleans most of the things created
#	omen                    # remove NEMO* and YAPP* things, cleans the path
#
#
# Within NEMO there are a few other scripts which have been used to automate
# installations:
#    src/scripts/quickps		(deprecated)
#    src/scripts/bootstrap		(deprecated)
#    src/scripts/test_a_new_nemo_cvs
#
#
# 25-jul-01  Peter Teuben       created, for MANYBODY
# 18-jan-02  PJT                added optional PGPLOT if detected
#  3-dec-02  PJT                added vogl stuff
#  1-mar-03  PJT                added make_html 
# 17-jun-03  PJT                better path, rehash for immediate use
# 15-oct-03  PJT                added gyfalcON
# 23-mar-04  PJT                for NEMO 3.2 - no more NEMOHOST
# 30-jul-04  PJT                make PGPLOT and CFITSIO optional bootstrappable

rm -f install.log >& /dev/null
touch install.log

set nexec=117            

set stat = 0
echo \(Sending output to install.log\)

set copts=()

if (-d local/pgplot) then
  echo "Assuming we're using the local pgplot"
  set copts=($copts --with-yapp=pgplot --with-pgplot-prefix=`pwd`/lib)
  set pgplot=1
else 
  set pgplot=0
endif

if (-e local/cfitsio) then
  echo "Installing from the local cfitsio source"
  set copts=($copts --enable-cfitsio --with-cfitsio-prefix=`pwd`)
  if (! -e include) ln -s inc include
  src/scripts/cfitsio.install >& install.cfitsio.log
endif

./configure $copts >>& install.log

echo Initializing NEMO environment
source nemo_start >>& install.log
echo Postconfig
make postconfig >>& install.log
source NEMORC.local
if ($pgplot) then
    echo Installing pgplot library
    make pgplot >>& install.log
endif

rehash
echo '++++++++++++++++++++++++++++++++++++++++' >>& install.log

echo Building NEMO library 
(cd src; make -i clean install) >>& install.log
if ($status) then
    @ stat++
endif
rehash
echo '++++++++++++++++++++++++++++++++++++++++' >>& install.log

echo Building html files for all the manual pages
(cd man; ./make_html)  >>& install.log

echo '++++++++++++++++++++++++++++++++++++++++' >>& install.log

echo Building some sample executables by running the testsuite with -b:
echo '   You can later build all executables with "cd $NEMO;make bins"'
echo '   or using "mknemo <programname>" on a per-case basis'
if (-d CVS) then
  echo "    Since you also seem to have a CVS structure (very good!)"
  echo "    you can also update code directly via CVS, using the -u flag to mknemo:"
  echo '                mknemo -u <programname>'
  echo or
  echo '                mknemo -u -l <programname>'
  echo if the library also needs to be rebuild.
end

src/scripts/testsuite -b >>& install.log

if (1) then
  ( cd usr/dehnen/falcON; make clean nemo_bins)  >& install_falcON.log
endif

if ($stat == 0) then
    echo "Note: Although your current shell now has the NEMO environment loaded,"
    echo "      new shells will not have NEMO pre-loaded. You would need to add"
    echo "      the following command/alias to your .cshrc (or equivalent) file:"
    echo "                   source $NEMO/nemo_start"
    rehash
else
    echo Install failed: stat = $stat
endif


set n1=(`grep TESTSUITE: install.log | grep -v OK | wc -l`)
set n2=(`grep TESTSUITE: install.log | wc -l`)
set n3=(`ls bin|wc -l`)

echo "Found $n3 executables ($nexec at last count)"
echo "Found $n1/$n2 problems with the TESTSUITE"
if ($n1 > 0) then
  grep TESTSUITE: install.log | grep -v OK 
endif
back to top