Revision 1349 trunk/scripts/admb/admb.bat

admb.bat (revision 1349)
29 29
set srcs=
30 30
set tpls=
31 31
set objs=
32
set s=-s 
33 32
set bounds=-bounds
34 33
set debug=
35 34

  
36 35
for %%a in (%*) do (
37 36
  set arg=%%a
38 37
  if "!arg:~0,1!"=="-" (
39
    if %%a==-d (
40
      set d=-d 
38
    if "%%a"=="-d" (
39
      set d=-d
41 40
      set dll=-dll
42 41
    )
43
    if %%a==-g (
42
    if "%%a"=="-g" (
44 43
      set g=-g
45 44
      set debug=-debug
46 45
    )
47
    if %%a==-r (
48
      set r=-r 
46
    if "%%a"=="-r" (
47
      set r=-r
49 48
      set parser=tpl2rem
50 49
    )
51
    if %%a==-s (
52
      set s=-s 
50
    if "%%a"=="-s" (
53 51
      set bounds=-bounds
54 52
    )
55
    if %%a==-O (
56
      set s=
53
    if "%%a"=="-f" (
57 54
      set bounds=
58 55
    )
59 56
  ) else (
60 57
    if "%%~xa"=="" (
61 58
      set tpls=!tpls! %%a
62
    ) else (
63
      if "%%~xa"==".c" (
64
        set srcs=!srcs! %%a
65
      )
66
      if "%%~xa"==".cpp" (
67
        set srcs=!srcs! %%a
68
      )
69
      if "%%~xa"==".o" (
70
        set objs=!objs! %%a
71
      )
72
      if "%%~xa"==".obj" (
73
        set objs=!objs! %%a
74
      )
75
      if "%%~xa"==".tpl" (
76
        set tpls=!tpls! %%a
77
      )
78 59
    )
60
    if "%%~xa"==".c" (
61
      set srcs=!srcs! %%a
62
    )
63
    if "%%~xa"==".cpp" (
64
      set srcs=!srcs! %%a
65
    )
66
    if "%%~xa"==".o" (
67
      set objs=!objs! %%a
68
    )
69
    if "%%~xa"==".obj" (
70
      set objs=!objs! %%a
71
    )
72
    if "%%~xa"==".tpl" (
73
      set tpls=!tpls! %%a
74
    )
79 75
  )
80 76
)
81
if "!srcs!"=="" && "!tpls!"="" && "!objs!"=="" (
82
  echo.&echo Error: Nothing to build
83
  echo.
84
  goto HELP
77
if not defined tpls (
78
  if not defined srcs (
79
    if not defined objs (
80
      echo.&echo Error: Nothing to build
81
      echo.
82
      goto HELP
83
    )
84
  )
85 85
)
86
if not defined parser set parser=tpl2cpp
87

  
86
if not defined tpls (
87
  goto compiler
88
)
89
if not defined parser (
90
  set parser=tpl2cpp
91
)
88 92
for %%a in (!tpls!) do (
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff