Revision 1355

trunk/scripts/admb/adcomp.bat (revision 1355)
1 1
@echo off
2
setlocal
2
setlocal EnableExtensions EnableDelayedExpansion
3 3
if [%1]==[] goto HELP
4 4
if [%1]==[-help] goto HELP
5 5
if [%1]==[--help] goto HELP
trunk/scripts/admb/admb.bat (revision 1355)
7 7
if [%1]==[--help] goto HELP
8 8

  
9 9
if defined ADMB_HOME (
10
  set "ADMB_HOME="
10
  set ADMB_HOME=
11 11
)
12
if defined ADMB_HOME (
13
  echo "Error: Unable to unset ADMB_HOME=!ADMB_HOME!."
14
  goto EOF
15
)
12 16
for %%a in (%0.bat) do (
13 17
  set HAS_PATH=%%~$PATH:a
14
  if not "!HAS_PATH!"=="" (
18
  if defined HAS_PATH (
15 19
    set ADMB_PATH="%%~dp$PATH:a"
16 20
  ) else (
17 21
    set ADMB_PATH="%%~dpa"
......
20 24
  set ADMB_HOME=!CD!
21 25
  popd
22 26
)
23
if not "!MINGW_HOME!"=="" (
27
if not defined ADMB_HOME (
28
  echo "Error: ADMB_HOME is not defined."
29
  goto EOF
30
)
31
if defined MINGW_HOME (
24 32
  set PATH=!ADMB_HOME!\bin;!MINGW_HOME!\bin;!PATH!
25 33
) else (
26 34
  set PATH=!ADMB_HOME!\bin;!ADMB_HOME!\utilities\mingw\bin;!PATH!
27 35
)
28

  
36
set tpls=
29 37
set srcs=
30
set tpls=
31 38
set objs=
32
set tplbounds=-bounds
33
set tpldebug=
34
set fast=
35

  
36 39
for %%a in (%*) do (
37 40
  set arg=%%a
38 41
  if "!arg:~0,1!"=="-" (
39
    if "%%a"=="-d" (
40
      set d=-d
41
      set dll=-dll
42
    if "!arg!"=="-d" (
43
      set d= -d
42 44
    )
43
    if "%%a"=="-g" (
44
      set g=-g
45
      set tpldebug=-debug
45
    if "!arg!"=="-g" (
46
      set g= -g
46 47
    )
47
    if "%%a"=="-r" (
48
      set r=-r
48
    if "!arg!"=="-r" (
49
      set r = -r
49 50
      set parser=tpl2rem
50 51
    )
51
    if "%%a"=="-s" (
52
      set tplbounds=-bounds
52
    if "!arg!"=="-f" (
53
      set fast= -f
53 54
    )
54
    if "%%a"=="-f" (
55
      set fast=-f
56
    )
57 55
  ) else (
58 56
    if "%%~xa"=="" (
59
      set tpls=!tpls! %%a
57
      if not defined tpls (
58
        set tpls=!arg!
59
      ) else (
60
        set tpls=!tpls! !arg!
61
      )
60 62
    )
63
    if "%%~xa"==".tpl" (
64
      if not defined tpls (
65
        set tpls=%%a
66
      ) else (
67
        set tpls=!tpls! !arg!
68
      )
69
    )
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff