Revision 765

branches/pthreads-737/VERSION (revision 765)
1
11.0
branches/pthreads-737/scripts/admb/admb.bat (revision 765)
1
@echo off
2

  
3
setlocal EnableExtensions EnableDelayedExpansion
4

  
5
if [%1]==[] goto HELP
6
if [%1]==[-help] goto HELP
7
if [%1]==[--help] goto HELP
8

  
9
set srcs=
10
set tpls=
11
set objs=
12

  
13
for %%a in (%*) do (
14
  set arg=%%a
15
  if "!arg:~0,1!"=="-" (
16
    if %%a==-d (
17
      set d=-d 
18
      set dll=-dll
19
    )
20
    if %%a==-g (
21
      set g=-g
22
    )
23
    if %%a==-r (
24
      set r=-r 
25
      set parser=tpl2rem
26
    )
27
    if %%a==-s (
28
      set s=-s 
29
      set bounds=-bounds
30
    )
31
  ) else (
32
    if "%%~xa"=="" (
33
      set tpls=!tpls! %%a
34
    ) else (
35
      if "%%~xa"==".c" (
36
        set srcs=!srcs! %%a
37
      )
38
      if "%%~xa"==".cpp" (
39
        set srcs=!srcs! %%a
40
      )
41
      if "%%~xa"==".o" (
42
        set objs=!objs! %%a
43
      )
44
      if "%%~xa"==".obj" (
45
        set objs=!objs! %%a
46
      )
47
      if "%%~xa"==".tpl" (
48
        set tpls=!tpls! %%a
49
      )
50
    )
51
  )
52
)
53
if not defined parser set parser=tpl2cpp
54

  
55
for %%a in (!tpls!) do (
56
  if not exist %%~na.tpl goto ERROR1
57
  set model=%%~na
58
  del !model!.cpp !model!.htp !model!.obj !model!.exe 2> NUL
59
  set CMD=!parser! !bounds! !dll! !model!
60
  echo.&echo *** !CMD!
61
  call !CMD!
62
  if not exist !model!.cpp goto ERROR2
63
  if not exist !model!.htp goto ERROR2
64
)
65

  
66
for %%b in (!tpls!) do (
67
  set model=%%~nb
68
  for %%a in (!model! !srcs!) do (
69
    set src=%%~na
70
    set CMD=adcomp !d! !g! !r! !s! !src!
71
    echo.&echo *** !CMD!
72
    call !CMD!
73
    if not exist !src!.obj (
74
      echo.&echo Error: Unable to build %%a
75
      goto EOF
76
    )
77
  )
78
)
79
for %%a in (!srcs!) do (
80
  set src=%%~na
81
  set objs=!objs! !src!.obj
82
)
83
for %%a in (!tpls!) do (
84
  set model=%%~na
85
  set CMD=adlink !d! !g! !r! !s! !model!.obj !objs!
86
  echo.&echo *** !CMD!
87
  call !CMD!
88
  if defined dll (
89
    if not exist %%~na.dll goto ERROR2
90
  ) else (
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff