gifa_v4
|
Brief_description,
History,
KNOWN_BUGS,
MACHINE_REQUIREMENTS,
README,
README.html,
TODO,
gifav4_HPUX.tar.Z,
gifav4_HPUX.tar.gz,
gifav4_LINUX.tar.gz,
gifav4_SGI.tar.Z,
gifav4_SGI.tar.gz,
gifav4_SGI3000.tar.Z,
gifav4_SOL2.tar.Z,
gifav4_SOL2.tar.gz,
gifav4_basic.tar.Z,
gifav4_basic.tar.gz,
gifav4_data.tar.Z,
gifav4_data.tar.gz,
makefile,
previous_version
|
|
|
#Makefile for installation of GIFA
SHELL = /bin/sh
GIFA_DEF = gifa_med
# Remarque, this will fail on MachTen, because it lacks uname.
# To have it work, create a shell script called uname (in /usr/local/bin
# for instance), which contains (with no # of course !) :
# echo MachTen
# that will fix it
ARCHI = -@archi="`uname`"; \
echo "for $$archi"; \
if [ $$archi = "HP-UX" ] ; then \
kit=gifav4_HPUX.tar.Z; \
kit1=gifav4_HPUX.tar.gz; \
elif [ $$archi = "IRIX" ] ; then \
if ( uname -r | grep '5\.' >/dev/null ) ; then \
echo "IRIX 5.x"; \
kit=gifav4_SGI.tar.Z; \
kit1=gifav4_SGI.tar.gz; \
elif ( uname -r | grep '6\.' >/dev/null ) ; then \
echo "IRIX 6.x"; \
kit=gifav4_SGI.tar.Z; \
kit1=gifav4_SGI.tar.gz; \
else \
echo "IRIX 4.x"; \
kit=gifav4_SGI3000.tar.Z; \
kit1=gifav4_SGI3000.tar.gz; \
fi; \
elif [ $$archi = "IRIX64" ] ; then \
echo "IRIX 6.x, not in native mode, will use 5.x version"; \
kit=gifav4_SGI.tar.Z; \
kit1=gifav4_SGI.tar.gz; \
elif [ $$archi = "MachTen" ] ; then \
kit=gifav4_MachTen-Mac.tar.Z; \
kit1=gifav4_MachTen-Mac.tar.gz; \
elif [ $$archi = "AIX" ] ; then \
kit=gifav4_RS6000.tar.Z; \
kit1=gifav4_RS6000.tar.gz; \
elif [ $$archi = "SunOS" ] ; then \
release="`uname -r|cut -d . -f 1`"; \
if [ $$release = "5" ] ; then \
echo "Solaris 2.`uname -r|cut -d . -f 2`"; \
kit=gifav4_SOL2.tar.Z; \
kit1=gifav4_SOL2.tar.gz; \
else \
echo "`uname -s -r`"; \
kit=gifav4_SUN.tar.Z; \
kit1=gifav4_SUN.tar.gz; \
fi; \
elif [ $$archi = "mips" ] ; then \
kit=gifav4_MIPS.tar.Z; \
kit1=gifav4_MIPS.tar.gz; \
elif [ $$archi = "Linux" ] ; then \
echo "`uname -s -r`"; \
kit=gifav4_LINUX.tar.Z; \
kit1=gifav4_LINUX.tar.gz; \
else echo "Platform unknown"; exit 1 ; \
fi;
default :
@echo " Several choices : "
@echo
@echo " make unpack unpack the gifa_XXX.tar.Z files,"
@echo " make verify verify that distribution is complete"
@echo " make test_gifa run tests on gifa"
@echo " be carefull, will create ~ 6MegaByte on /usr/tmp"
@echo " certain tests will need DISPLAY to be set-up"
@echo " others require that the gifa_data.tar.Z has been downloaded"
@echo " make install install gifa on your machine"
@echo " you might have to be root for this."
@echo " make Bruker_install install some utilities for UX-NMR"
@echo " make clean delete all unneeded files after installation"
@echo
@echo " You should probably do these commands in sequence"
# this entry unpack the distribution files
unpack :
@echo
@echo "unpacking binaries..."
$(ARCHI) \
if [ -s $$kit ] ; then \
zcat $$kit | tar xof - ;\
else gunzip -c $$kit1 | tar xof - ;\
fi
@chmod 755 bin/*
@echo " ...done"
@echo " The following version of Gifa are present in the kit :"
@echo
@/bin/ls bin/gifa_*
@echo
@echo "If different versions are present, they correspond to different buffer size"
@echo "depending on the size of your machine (memory, swap space), you may want"
@echo "to choose a different version than the default one, which is $(GIFA_DEF)"
@echo "(see README_2)"
@echo
cp bin/$(GIFA_DEF) bin/gifa
@echo
@echo "unpacking basic..."
@if [ -s gifav4_basic.tar.Z ] ; then \
zcat gifav4_basic.tar.Z | tar xof - ;\
else gunzip -c gifav4_basic.tar.gz | tar xof - ;\
fi
@echo " ...done"
@echo
@if [ -s gifav4_data.tar.gz ] ; then \
echo "unpacking data..."; \
gunzip -c gifav4_data.tar.gz | tar xof - ; \
echo " ...done" ; \
fi
@if [ -s gifav4_data.tar.Z ] ; then \
echo "unpacking data..."; \
zcat gifav4_data.tar.Z | tar xof - ; \
echo " ...done" ; \
fi
chmod -R a+r *
@echo " Unpacking successful."
verify :
@echo " Checking if all the files are here..."
@cat List_of_files | split -100
@rm -f missing
-@for filelist in x??; do \
(ls `cat $$filelist` >/dev/null 2>>missing) \
done
@if [ -s missing ] ; then \
echo "WARNING - the following files are missing:" ; \
cat missing ; \
echo ; \
echo "If you did not ftp the gifav4_data.tar.Z, then all the data/* files are missing" ; \
echo "It is Ok, unless you want to use the test_gifa utility" ; \
echo "In which case, expect the ft_base test to fail (no big deal ;-)" ; \
else \
echo "...Looks good"; \
fi
@echo
@rm -f missing x??
#test Gifa by running the standard test
test_gifa :
(cd test ; ../bin/gifa)
#for installing gifa on that machine
install :
@echo "Gifa relies on the /usr/local directory"
@echo " /usr/local/bin which will contains all binaries"
@echo " and /usr/local/gifa which contains all the gifa specific files"
@echo " (macros, docs, help files, etc...)
@x=`pwd`; echo " /usr/local/gifa is built as a link on $$x"
@echo
@echo
@echo "Creating directories..."
-if [ ! -d /usr/local ] ; then \
mkdir /usr/local; chmod a+r /usr/local; \
fi
-if [ ! -d /usr/local/bin ] ; then \
mkdir /usr/local/bin; chmod a+r /usr/local/bin;\
fi
@echo
@echo "Preserving previous version..."
@if [ -d /usr/local/gifa ] ; then \
if [ -f /usr/local/gifa/licence ] ; then \
echo " preserving licence file"; \
cp /usr/local/gifa/licence /usr/local/licence; \
fi ; \
x=`date +%y%m%d_%X`; \
mv /usr/local/gifa /usr/local/gifa_old_$$x; \
echo " Previous version of the Gifa directory has been moved to /usr/local/gifa_old_$$x"; \
if [ -f /usr/local/bin/gifa ] ; then \
mv /usr/local/bin/gifa /usr/local/bin/gifa_old_$$x; \
echo " Previous version of the Gifa binary has been moved to /usr/local/bin/gifa_old_$$x" ; \
fi ; \
fi
@echo
@echo "Copying Gifa....."
(umask 022; ln -s `pwd` /usr/local/gifa)
cp bin/gifa /usr/local/bin/gifa
@if [ -f /usr/local/licence ] ; then \
echo " restoring licence file"; \
mv /usr/local/licence /usr/local/gifa/licence; \
fi
@echo
@echo " When getting used to Gifa, you may wish to remove the gifa_* in ./bin"
@echo " These files can be very big on certain machines."
@echo " (see README_2)"
@echo
@echo "Copying utilities ....."
cp com/gifaplot /usr/local/bin
cp com/gifaprint /usr/local/bin
@echo " Do not forget to adapt those 2 shell scripts for your set-up"
@echo
-cp com/XMgifa /usr/lib/X11/app-defaults
-chmod 444 /usr/lib/X11/app-defaults/XMgifa
@echo " you may adapt this last one if you don't like the way it looks ;-)"
@echo
@echo "...Installation Successful."
@echo "gifa is now in /usr/local/bin"
@echo "to use it, add /usr/local/bin to your PATH"
@echo
@echo "Do not forget to get a valid licence (see README)"
Bruker_install :
@echo "Copying a set of commands for getting Bruker/UXNMR files...."
@echo "(Varian does not need special utility, just use the READV command)"
cp bin/ux2cach /usr/local/bin
cp util/ux2cache/ux2cach.sh /usr/local/bin
cp util/get/* /usr/local/bin
@echo "...Done"
@echo "Installation Successful."
clean:
rm *.Z *.gz
|