File: iconf_iff

package info (click to toggle)
ifeffit 1:1.3.0-3
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k
  • size: 13,652 kB
  • ctags: 7,237
  • sloc: fortran: 33,599; ansic: 26,405; sh: 7,184; makefile: 5,469; python: 3,273; perl: 3,146; tcl: 95
file content (63 lines) | stat: -rwxr-xr-x 2,046 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
##
## shell script to help configure ifeffit:
##   1. get version number from Changelog (and return to rest of configure script)
##   2. write maxpts.h and sys.h for ifeffit library
##
prefix=$1
ARRSIZE=$2
PACKAGE=$3
def_prefix=$4
test "x$prefix"  = "xNONE" && prefix=$def_prefix
test "x$prefix"  = "xNONE" && prefix='/usr/local'
test "x$prefix"  = "x"     && prefix='/usr/local'
test "x$ARRSIZE" = "x"     && ARRSIZE='large'
test "x$PACKAGE" = "x"     && PACKAGE='ifeffit'
# echo $prefix / $PACKAGE / $ARRSIZE

VERSION=`grep '* Version' ChangeLog | head -1| sed 's/[ ]*\* Version[ ]*//g' | sed 's/:.*//g'`

srcdir='src/lib'
cright="Copyright (c) 2006 Matt Newville, Univ of Chicago"

##
## set arraysize to maxpts.h
case $ARRSIZE in
  huge)   size=16384 ;;
  medium) size=4096  ;;
  small)  size=2048  ;;
  tiny)   size=1024  ;;
  large)  size=8192  ;;
  *)      size=4096  ;;
esac

current=`cat $srcdir/arrsize.dat`
maxpts_h="$srcdir/maxpts.h"
if test "x$current" == "x$size" && [ -f $maxpts_h ] ; then \
  x=1
else
   echo "c{maxpts.h  -*-fortran-*- "                  > $maxpts_h
   echo "         integer  maxpts, maxsize_array"    >> $maxpts_h
   echo "         parameter(maxsize_array =  $size)" >> $maxpts_h
   echo "         parameter(maxpts = maxsize_array)" >> $maxpts_h
   echo "c}"                                         >> $maxpts_h
   echo "$size" > $srcdir/arrsize.dat
fi

##
## write sys.h

sys_h="$srcdir/sys.h"
echo "c{sys.h  -*-fortran-*- "                      > $sys_h
echo "c system and build specific stuff goes here" >> $sys_h
echo "c to be included in iff_config.f"            >> $sys_h
echo "       sysdir = '$prefix/share/$PACKAGE'"    >> $sys_h
echo "       pgdev  = '/xserve'"                   >> $sys_h
echo "       inifile= 'startup.iff  .ifeffit'"     >> $sys_h
echo "       build = '$VERSION'//"                 >> $sys_h
echo "     $   ' $cright'"                         >> $sys_h
echo "c}"                                          >> $sys_h

##
## finally, output the version number
echo $VERSION