Revision 1257 trunk/scripts/admb/admb

admb (revision 1257)
56 56
PATH=$ADMB_HOME/bin:$PATH
57 57

  
58 58
# Pop args until model=$1
59
unset dll
59 60
unset debug
60
unset bounds
61
unset d
62
unset dll
63
unset g
64
unset r
65
unset s
66
unset c
61
unset tpl2lex
62
unset library
63
unset compileonly
64
dll=
65
debug=
67 66
tpl2lex=tpl2cpp
68
s=-s
69
bounds=
70 67
library=safe
71
while getopts "dgrscO" A; do
68
compileonly=
69
output=
70
while getopts "dgrsfco:" A; do
72 71
  case $A in
73
    d) d=-d; dll=-dll
72
    d) 
73
       dll=-dll
74 74
       ;;
75
    g) g=-g; debug=-debug
75
    g) 
76
       debug=-debug
76 77
       ;;
77
    r) r=-r; tpl2lex=tpl2rem
78
    r) 
79
       tpl2lex=tpl2rem
78 80
       ;;
79
    s) s=-s;
81
    s)
80 82
       ;;
81
    f) s=; library=opt; bounds=
83
    f) 
84
       library=opt
82 85
       ;;
83
    c) c=1
86
    c) 
87
       compileonly=yes
84 88
       ;;
89
    o) 
90
       output="$OPTARG"
91
       ;;
85 92
    *)
86 93
       help
87 94
       exit 1
......
158 165
  rm -vf tfile1 tfile2 tfile3 tfile4 tfile5
159 166
  rm -f $model.cpp $model.htp $model.o $model
160 167

  
161
  CMD="$tpl2lex $debug $bounds $dll $model"
168
  CMD="$tpl2lex $debug $dll $model"
162 169
  echo -e \\n\*\*\* Parsing tpl file: $model.tpl\\n$CMD
163 170
  eval $CMD
164 171

  
......
204 211
  objs="${file%.*}.o $objs"
205 212
done
206 213

  
207
if [ ! -z "$c" ]; then
214
if [ ! -z "$compileonly" ]; then
208 215
  objects=$tplobjs
209 216
  if [ ! -z "$objs" ]; then
210 217
    objects=$objs
......
215 222

  
216 223
for file in $tplobjs
217 224
do
218
  model=${file%.*}
225
  if [ ! -z  "$output" ]; then
226
    model="$output"
227
  else
228
    model=${file%.*}
229
  fi
219 230
  if [ ! -z  "$dll" ]; then
220 231
    CMD="$CXX $LDFLAGS -o $model.so"
221 232
  else
......
244 255

  
245 256
if [[ "$tplobjs" == "" ]]; then
246 257
  outputfilebasename=
258
  if [ ! -z  "$output" ]; then
259
    outputfilebasename="$output"
260
  fi
247 261
  listobjs=
248 262
  for file in $nontpls
249 263
  do
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff