added scripts/ Mac OS X makefiles M.Z.

This commit is contained in:
cvs
2004-06-15 06:08:37 +00:00
parent e5fa7645b0
commit ec8de08f3b
7 changed files with 699 additions and 0 deletions

32
tecs/killtecs Executable file
View File

@ -0,0 +1,32 @@
#!/bin/tcsh
if ("$1" == "") then
set ini="tecs.ini"
else
set ini="tecs_$1.ini"
endif
cd ~/tecs
if (! -e $ini) then
echo ~/tecs/$ini not found
echo ""
set all=(tecs*.ini)
echo "Usage:"
echo ""
if ("$all" == "tecs.ini") then
echo " killtecs"
else
echo " killtecs <version>"
echo ""
echo "where <version> is one of"
echo ""
echo ${all:as/tecs_//:as/.ini//}
endif
exit
endif
set nums=`ps x | grep "TecsServer $ini" | grep -v grep | cut -b 0-6`
if ("$nums" == "") then
echo "TecsServer $1 is not running"
else
kill -9 $nums
echo "TecsServer $1 killed (processes $nums)"
endif

7
tecs/macosx_def Normal file
View File

@ -0,0 +1,7 @@
#DFORTIFY= -DFORTIFY -I$(ROOT)/$(SRC)
#FORTIFYOBJ= fortify.o strdup.o
MFLAGS=-f $(SRC)makefile_macosx$(DUMMY) SRC=$(SRC)
#HDFROOT=

390
tecs/make_crv Normal file
View File

@ -0,0 +1,390 @@
$(CFGDIR)c020415.crv: ccrv src/inp/c020415.inp
$Q -p$(CFGDIR)
$(CFGDIR)c030307.crv: ccrv src/inp/c030307.inp
$Q -p$(CFGDIR)
$(CFGDIR)c030311.crv: ccrv src/inp/c030311.inp
$Q -p$(CFGDIR)
$(CFGDIR)c12900.crv: ccrv src/inp/c12900.inp
$Q -p$(CFGDIR)
$(CFGDIR)c17844.crv: ccrv src/inp/c17844.inp
$Q -p$(CFGDIR)
$(CFGDIR)c_1.crv: ccrv src/inp/c_1.inp
$Q -p$(CFGDIR)
$(CFGDIR)c1.crv: ccrv src/inp/c1.inp
$Q -p$(CFGDIR)
$(CFGDIR)c_2.crv: ccrv src/inp/c_2.inp
$Q -p$(CFGDIR)
$(CFGDIR)c2.crv: ccrv src/inp/c2.inp
$Q -p$(CFGDIR)
$(CFGDIR)c_3.crv: ccrv src/inp/c_3.inp
$Q -p$(CFGDIR)
$(CFGDIR)c_4.crv: ccrv src/inp/c_4.inp
$Q -p$(CFGDIR)
$(CFGDIR)cma11.crv: ccrv src/inp/cma11.inp
$Q -p$(CFGDIR)
$(CFGDIR)cplus45.crv: ccrv src/inp/cplus45.inp
$Q -p$(CFGDIR)
$(CFGDIR)cplus70.crv: ccrv src/inp/cplus70.inp
$Q -p$(CFGDIR)
$(CFGDIR)ds3b.crv: ccrv src/inp/ds3b.inp
$Q -p$(CFGDIR)
$(CFGDIR)dt-470.crv: ccrv src/inp/dt-470.inp
$Q -p$(CFGDIR)
$(CFGDIR)g24741.crv: ccrv src/inp/g24741.inp
$Q -p$(CFGDIR)
$(CFGDIR)g25328.crv: ccrv src/inp/g25328.inp
$Q -p$(CFGDIR)
$(CFGDIR)g25550.crv: ccrv src/inp/g25550.inp
$Q -p$(CFGDIR)
$(CFGDIR)g26552.crv: ccrv src/inp/g26552.inp
$Q -p$(CFGDIR)
$(CFGDIR)gemark.crv: ccrv src/inp/gemark.inp
$Q -p$(CFGDIR)
$(CFGDIR)mz020124.crv: ccrv src/inp/mz020124.inp
$Q -p$(CFGDIR)
$(CFGDIR)mz030500.crv: ccrv src/inp/mz030500.inp
$Q -p$(CFGDIR)
$(CFGDIR)pcry.crv: ccrv src/inp/pcry.inp
$Q -p$(CFGDIR)
$(CFGDIR)psam.crv: ccrv src/inp/psam.inp
$Q -p$(CFGDIR)
$(CFGDIR)r10401.crv: ccrv src/inp/r10401.inp
$Q -p$(CFGDIR)
$(CFGDIR)r10402.crv: ccrv src/inp/r10402.inp
$Q -p$(CFGDIR)
$(CFGDIR)r10403.crv: ccrv src/inp/r10403.inp
$Q -p$(CFGDIR)
$(CFGDIR)r10409.crv: ccrv src/inp/r10409.inp
$Q -p$(CFGDIR)
$(CFGDIR)r10410.crv: ccrv src/inp/r10410.inp
$Q -p$(CFGDIR)
$(CFGDIR)r10411.crv: ccrv src/inp/r10411.inp
$Q -p$(CFGDIR)
$(CFGDIR)r10413.crv: ccrv src/inp/r10413.inp
$Q -p$(CFGDIR)
$(CFGDIR)r3509.crv: ccrv src/inp/r3509.inp
$Q -p$(CFGDIR)
$(CFGDIR)r3510.crv: ccrv src/inp/r3510.inp
$Q -p$(CFGDIR)
$(CFGDIR)rhfe0734.crv: ccrv src/inp/rhfe0734.inp
$Q -p$(CFGDIR)
$(CFGDIR)rhfe4140.crv: ccrv src/inp/rhfe4140.inp
$Q -p$(CFGDIR)
$(CFGDIR)rhfe8119.crv: ccrv src/inp/rhfe8119.inp
$Q -p$(CFGDIR)
$(CFGDIR)rhfe8244.crv: ccrv src/inp/rhfe8244.inp
$Q -p$(CFGDIR)
$(CFGDIR)rhfe8733.crv: ccrv src/inp/rhfe8733.inp
$Q -p$(CFGDIR)
$(CFGDIR)ruox.crv: ccrv src/inp/ruox.inp
$Q -p$(CFGDIR)
$(CFGDIR)rx1611.crv: ccrv src/inp/rx1611.inp
$Q -p$(CFGDIR)
$(CFGDIR)rx1976.crv: ccrv src/inp/rx1976.inp
$Q -p$(CFGDIR)
$(CFGDIR)rxdil.crv: ccrv src/inp/rxdil.inp
$Q -p$(CFGDIR)
$(CFGDIR)std1.crv: ccrv src/inp/std1.inp
$Q -p$(CFGDIR)
$(CFGDIR)std4.crv: ccrv src/inp/std4.inp
$Q -p$(CFGDIR)
$(CFGDIR)std6.crv: ccrv src/inp/std6.inp
$Q -p$(CFGDIR)
$(CFGDIR)type_c.crv: ccrv src/inp/type_c.inp
$Q -p$(CFGDIR)
$(CFGDIR)x09882.crv: ccrv src/inp/x09882.inp
$Q -p$(CFGDIR)
$(CFGDIR)x09883.crv: ccrv src/inp/x09883.inp
$Q -p$(CFGDIR)
$(CFGDIR)x09941.crv: ccrv src/inp/x09941.inp
$Q -p$(CFGDIR)
$(CFGDIR)x10045.crv: ccrv src/inp/x10045.inp
$Q -p$(CFGDIR)
$(CFGDIR)x10409.crv: ccrv src/inp/x10409.inp
$Q -p$(CFGDIR)
$(CFGDIR)x12532.crv: ccrv src/inp/x12532.inp
$Q -p$(CFGDIR)
$(CFGDIR)x12533.crv: ccrv src/inp/x12533.inp
$Q -p$(CFGDIR)
$(CFGDIR)x12905.crv: ccrv src/inp/x12905.inp
$Q -p$(CFGDIR)
$(CFGDIR)x13089.crv: ccrv src/inp/x13089.inp
$Q -p$(CFGDIR)
$(CFGDIR)x13090.crv: ccrv src/inp/x13090.inp
$Q -p$(CFGDIR)
$(CFGDIR)x14126.crv: ccrv src/inp/x14126.inp
$Q -p$(CFGDIR)
$(CFGDIR)x14130.crv: ccrv src/inp/x14130.inp
$Q -p$(CFGDIR)
$(CFGDIR)x14231.crv: ccrv src/inp/x14231.inp
$Q -p$(CFGDIR)
$(CFGDIR)x14667.crv: ccrv src/inp/x14667.inp
$Q -p$(CFGDIR)
$(CFGDIR)x15601.crv: ccrv src/inp/x15601.inp
$Q -p$(CFGDIR)
$(CFGDIR)x17627.crv: ccrv src/inp/x17627.inp
$Q -p$(CFGDIR)
$(CFGDIR)x2060.crv: ccrv src/inp/x2060.inp
$Q -p$(CFGDIR)
$(CFGDIR)x22637.crv: ccrv src/inp/x22637.inp
$Q -p$(CFGDIR)
$(CFGDIR)x22642.crv: ccrv src/inp/x22642.inp
$Q -p$(CFGDIR)
$(CFGDIR)x22643.crv: ccrv src/inp/x22643.inp
$Q -p$(CFGDIR)
$(CFGDIR)x22644.crv: ccrv src/inp/x22644.inp
$Q -p$(CFGDIR)
$(CFGDIR)x23167.crv: ccrv src/inp/x23167.inp
$Q -p$(CFGDIR)
$(CFGDIR)x24506.crv: ccrv src/inp/x24506.inp
$Q -p$(CFGDIR)
$(CFGDIR)x29630.crv: ccrv src/inp/x29630.inp
$Q -p$(CFGDIR)
$(CFGDIR)x29746.crv: ccrv src/inp/x29746.inp
$Q -p$(CFGDIR)
$(CFGDIR)x31317.crv: ccrv src/inp/x31317.inp
$Q -p$(CFGDIR)
$(CFGDIR)x31318.crv: ccrv src/inp/x31318.inp
$Q -p$(CFGDIR)
$(CFGDIR)x31319.crv: ccrv src/inp/x31319.inp
$Q -p$(CFGDIR)
$(CFGDIR)x31320.crv: ccrv src/inp/x31320.inp
$Q -p$(CFGDIR)
$(CFGDIR)z030114.crv: ccrv src/inp/z030114.inp
$Q -p$(CFGDIR)
all_crv: \
$(CFGDIR)c020415.crv \
$(CFGDIR)c030307.crv \
$(CFGDIR)c030311.crv \
$(CFGDIR)c12900.crv \
$(CFGDIR)c17844.crv \
$(CFGDIR)c_1.crv \
$(CFGDIR)c1.crv \
$(CFGDIR)c_2.crv \
$(CFGDIR)c2.crv \
$(CFGDIR)c_3.crv \
$(CFGDIR)c_4.crv \
$(CFGDIR)cma11.crv \
$(CFGDIR)cplus45.crv \
$(CFGDIR)cplus70.crv \
$(CFGDIR)ds3b.crv \
$(CFGDIR)dt-470.crv \
$(CFGDIR)g24741.crv \
$(CFGDIR)g25328.crv \
$(CFGDIR)g25550.crv \
$(CFGDIR)g26552.crv \
$(CFGDIR)gemark.crv \
$(CFGDIR)mz020124.crv \
$(CFGDIR)mz030500.crv \
$(CFGDIR)pcry.crv \
$(CFGDIR)psam.crv \
$(CFGDIR)r10401.crv \
$(CFGDIR)r10402.crv \
$(CFGDIR)r10403.crv \
$(CFGDIR)r10409.crv \
$(CFGDIR)r10410.crv \
$(CFGDIR)r10411.crv \
$(CFGDIR)r10413.crv \
$(CFGDIR)r3509.crv \
$(CFGDIR)r3510.crv \
$(CFGDIR)rhfe0734.crv \
$(CFGDIR)rhfe4140.crv \
$(CFGDIR)rhfe8119.crv \
$(CFGDIR)rhfe8244.crv \
$(CFGDIR)rhfe8733.crv \
$(CFGDIR)ruox.crv \
$(CFGDIR)rx1611.crv \
$(CFGDIR)rx1976.crv \
$(CFGDIR)rxdil.crv \
$(CFGDIR)std1.crv \
$(CFGDIR)std4.crv \
$(CFGDIR)std6.crv \
$(CFGDIR)type_c.crv \
$(CFGDIR)x09882.crv \
$(CFGDIR)x09883.crv \
$(CFGDIR)x09941.crv \
$(CFGDIR)x10045.crv \
$(CFGDIR)x10409.crv \
$(CFGDIR)x12532.crv \
$(CFGDIR)x12533.crv \
$(CFGDIR)x12905.crv \
$(CFGDIR)x13089.crv \
$(CFGDIR)x13090.crv \
$(CFGDIR)x14126.crv \
$(CFGDIR)x14130.crv \
$(CFGDIR)x14231.crv \
$(CFGDIR)x14667.crv \
$(CFGDIR)x15601.crv \
$(CFGDIR)x17627.crv \
$(CFGDIR)x2060.crv \
$(CFGDIR)x22637.crv \
$(CFGDIR)x22642.crv \
$(CFGDIR)x22643.crv \
$(CFGDIR)x22644.crv \
$(CFGDIR)x23167.crv \
$(CFGDIR)x24506.crv \
$(CFGDIR)x29630.crv \
$(CFGDIR)x29746.crv \
$(CFGDIR)x31317.crv \
$(CFGDIR)x31318.crv \
$(CFGDIR)x31319.crv \
$(CFGDIR)x31320.crv \
$(CFGDIR)z030114.crv \
ALLINP= \
src/inp/c020415.inp \
src/inp/c030307.inp \
src/inp/c030311.inp \
src/inp/c12900.inp \
src/inp/c17844.inp \
src/inp/c_1.inp \
src/inp/c1.inp \
src/inp/c_2.inp \
src/inp/c2.inp \
src/inp/c_3.inp \
src/inp/c_4.inp \
src/inp/cma11.inp \
src/inp/cplus45.inp \
src/inp/cplus70.inp \
src/inp/ds3b.inp \
src/inp/dt-470.inp \
src/inp/g24741.inp \
src/inp/g25328.inp \
src/inp/g25550.inp \
src/inp/g26552.inp \
src/inp/gemark.inp \
src/inp/mz020124.inp \
src/inp/mz030500.inp \
src/inp/pcry.inp \
src/inp/psam.inp \
src/inp/r10401.inp \
src/inp/r10402.inp \
src/inp/r10403.inp \
src/inp/r10409.inp \
src/inp/r10410.inp \
src/inp/r10411.inp \
src/inp/r10413.inp \
src/inp/r3509.inp \
src/inp/r3510.inp \
src/inp/rhfe0734.inp \
src/inp/rhfe4140.inp \
src/inp/rhfe8119.inp \
src/inp/rhfe8244.inp \
src/inp/rhfe8733.inp \
src/inp/ruox.inp \
src/inp/rx1611.inp \
src/inp/rx1976.inp \
src/inp/rxdil.inp \
src/inp/std1.inp \
src/inp/std4.inp \
src/inp/std6.inp \
src/inp/type_c.inp \
src/inp/x09882.inp \
src/inp/x09883.inp \
src/inp/x09941.inp \
src/inp/x10045.inp \
src/inp/x10409.inp \
src/inp/x12532.inp \
src/inp/x12533.inp \
src/inp/x12905.inp \
src/inp/x13089.inp \
src/inp/x13090.inp \
src/inp/x14126.inp \
src/inp/x14130.inp \
src/inp/x14231.inp \
src/inp/x14667.inp \
src/inp/x15601.inp \
src/inp/x17627.inp \
src/inp/x2060.inp \
src/inp/x22637.inp \
src/inp/x22642.inp \
src/inp/x22643.inp \
src/inp/x22644.inp \
src/inp/x23167.inp \
src/inp/x24506.inp \
src/inp/x29630.inp \
src/inp/x29746.inp \
src/inp/x31317.inp \
src/inp/x31318.inp \
src/inp/x31319.inp \
src/inp/x31320.inp \
src/inp/z030114.inp \

23
tecs/make_crv.tcsh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/tcsh
set src=${1:h}
set files=($src/*.inp)
echo " " >! src/make_crv
set cfg=""
foreach file ($files)
set sens=${file:t:s/.inp//}
echo '$(CFGDIR)'"$sens.crv: ccrv $file" >> src/make_crv
echo ' $Q -p$(CFGDIR)' >> src/make_crv
echo '' >> src/make_crv
end
echo "all_crv: \" >> src/make_crv
foreach file ($files)
set sens=${file:t:s/.inp//}
echo ' $(CFGDIR)'"$sens.crv \" >> src/make_crv
end
echo '' >> src/make_crv
echo "ALLINP= \" >> src/make_crv
foreach file ($files)
echo " $file \" >> src/make_crv
end
echo '' >> src/make_crv

39
tecs/makefile_macosx Normal file
View File

@ -0,0 +1,39 @@
#---------------------------------------------------------------------------
# Makefile options for the TECS Client library and TecsServer
# machine-dependent part for Redhat Linux with AFS at PSI
#
# Markus Zolliker, March 2003
#--------------------------------------------------------------------------
include $(SRC)macosx_def
CC = gcc
FC = g77
CFLAGS = -DLINUX -g $(DFORTIFY)
FFLAGS = -Wimplicit -g
ARFLAGS = cr
# -- system dependent routines
# -- PGPLOT library additions
PGLIB = -L/usr/X11R6/lib -lX11 -L/sw/lib -lpng \
-Wl,-framework -Wl,Foundation -Wl,-framework -Wl,AppKit -lcc_dynamic
# -- library for ASYNSRV
HARDSUPLIB=$(SICST)/hardsup/libhlib.a
# -- readline library
RDLIB =-lreadline
# -- the following macros are used as a replacement for some automatic variables
# due to different make versions.
# This is for GNU make.
#
# list of prerequisites including paths for VPATH
Q=$^
# Fortran/C source file name
F=$<
C=$<
include $(SRC)make_gen

32
tecs/startecs Executable file
View File

@ -0,0 +1,32 @@
#!/bin/tcsh
if ("$1" == "") then
set ini="tecs.ini"
else
set ini="tecs_$1.ini"
endif
cd ~/tecs
if (! -e $ini) then
echo ~/tecs/$ini not found
echo ""
set all=(tecs*.ini)
echo "Usage:"
echo ""
if ("$all" == "tecs.ini") then
echo " startecs"
else
echo " startecs <version>"
echo ""
echo "where <version> is one of"
echo ""
echo ${all:as/tecs_//:as/.ini//}
endif
exit
endif
ps waux | grep "TecsServer $ini" | grep -v grep > /dev/null
if ($?) then
set nam=${ini:s/.ini//}
./keep_running ./TecsServer $ini -b ~/tecs/cfg/ -d ~/tecs/log/ -n $nam &
else
echo "TecsServer is running"
endif

176
tecs/tecsinstall Executable file
View File

@ -0,0 +1,176 @@
#!/bin/tcsh
# script to install tecs on an instrument computer
set base=/afs/psi.ch/project/sinq
set tecsdir=$base/common/lib/tecs
if ("$OSTYPE" == "linux") then
set osdir=$base/linux/stow/tecs
else if ("$OSTYPE" == "osf1") then
set osdir=$base/tru64/stow/tecs
else
echo "unknown os: $OSTYPE"
exit
endif
if (! -d bin) then
echo no 'bin' directory found
exit
endif
set inst=${PWD:t:al}
if ($inst == tascom) then
set inst=rita2
endif
echo -n "enter lowercase instrument name [$inst]: "
set ans=$<
if ("$ans" != "") then
set inst="$ans"
endif
set sd=${inst}_sics
if (! -d $sd) then
set sd=bin
endif
set ok=1
# find inst in inilist
set hos=(`grep "${inst}:" $tecsdir/inilist`) || set hos=(0 /)
set hos=$hos[2]
set hos=${hos:s/host=//}
if ("${hos:s,/,,}" != "$hos") then
set std=n
else
set std=y
endif
set ans=n
if ($std == y) set $ans=y
echo -n "is tecs the standard environment on $inst [$std] ? "
set ans="$<"
if ("$ans" == "y" || "$ans" == "Y") then
set ans=y
else if ("ans" == "n" || "$ans" == "N") then
set ans=n
else
set ans=$std
endif
echo "--------------------------------------------------------------------------"
if (-e $sd/startsics) then
grep "keep_running TecsServer" $sd/startsics > /dev/null
if (! $?) then
echo "the sequence starting TecsServer should be removed from $sd/startsics"
set ok=""
endif
grep startecs $sd/startsics > /dev/null
if ($?) then
if ($ans == y) then
echo "$sd/startsics should contain 'startecs'"
set ok=""
endif
else
if ($ans != y) then
echo "$sd/startsics should NOT contain 'startecs'"
set ok=""
endif
endif
else
echo "$sd/startsics not found"
set ok=""
endif
set tecs_tcl_not_found=1
if (-e $sd/${inst}.tcl) then
grep -i "DefineAlias tt " $sd/${inst}.tcl > /dev/null
if ($?) then
echo "$sd/${inst}.tcl should contain 'DefineAlias tt temperature'"
endif
grep -i "tecs on" $sd/${inst}.tcl > /dev/null
if ($?) then
if ($ans == y) then
echo "$sd/${inst}.tcl should contain 'tecs on'"
set ok=""
endif
else
if ($ans != y) then
echo "$sd/${inst}.tcl should NOT contain 'tecs on'"
set ok=""
endif
endif
grep "/tecs.tcl" $sd/${inst}.tcl > /dev/null
set tecs_tcl_not_found=$?
else
echo "$sd/${inst}.tcl not found"
set ok=""
endif
if (-e $sd/${inst}com.tcl) then
grep "/tecs.tcl" $sd/${inst}com.tcl > /dev/null
if ($? && $tecs_tcl_not_found) then
set hom='$home'
echo "$sd/${inst}com.tcl should contain 'source $hom/$sd/tecs.tcl' or similar"
set ok=""
endif
else
echo "$sd/${inst}com.tcl not found"
set ok=""
endif
if ("$ok" == "") then
echo ""
echo "please fix all above, before starting tecsinstall again"
echo -n "ignore and continue anyway [n] ? "
set ans="$<"
if ("$ans" != "y" && "$ans" != "Y") then
exit
endif
endif
set til=($sd/tecs.ini* tecs/tecs.ini* bi[n-n])
set tin="$til[1]"
if (-f $tin) then
set hos1=`grep "host=" $tin > /dev/null` && set hos1="$hos"
else
set hos1="$hos"
endif
echo "Specification for serial connection"
if ("$hos" == "/") then
if ($ans == n) then
echo " syntax: host=localhost:4000/<channel>"
else
echo " syntax: host=psts<nnn>:<3000+channel>"
endif
set hos=""
else
if ("$hos" != "$hos1") then
echo " actual value: host=$hos1"
endif
echo " recommended value: host=$hos (default)"
endif
echo -n " host="
set hans="$<"
if ("$hans" != "") then
if ("$hos" != "$hans") then
echo "if you are sure that this is valid,"
echo "please update $tecsdir/inilist for $inst"
endif
set hos="$hans"
endif
rm -rf bin/tecs
rm -f ${til:s/bin//} \
bin/TecsClient bin/TecsServer bin/keep_running bin/killtecs bin/startecs \
$sd/TecsClient $sd/TecsServer $sd/keep_running $sd/killtecs $sd/startecs
mkdir -p tecs
echo "host=$hos" > tecs/tecs.ini
ln -s $PWD/tecs/TecsClient bin/tecs
ln -s $PWD/tecs/TecsClient bin/TecsClient
ln -s $PWD/tecs/startecs bin/
ln -s $PWD/tecs/killtecs bin/
rsync -vrCt --delete $tecsdir/cfg tecs/ | grep -v speedup | grep -v wrote
rsync -vt $tecsdir/startecs tecs/ | grep -v speedup | grep -v wrote
rsync -vt $tecsdir/killtecs tecs/ | grep -v speedup | grep -v wrote
rsync -vt $osdir/bin/TecsClient tecs/ | grep -v speedup | grep -v wrote
rsync -vt $osdir/bin/TecsServer tecs/ | grep -v speedup | grep -v wrote
rsync -vt $osdir/bin/keep_running tecs/ | grep -v speedup | grep -v wrote
mkdir -p tecs/log/