Revision 1363 trunk/scripts/admb/admb.bat

admb.bat (revision 1363)
3 3
@REM  Copyright 2013 (c) ADMB Foundation
4 4
@REM
5 5

  
6
setlocal EnableExtensions EnableDelayedExpansion
7

  
8 6
if [%1]==[] goto HELP
9 7
if [%1]==[-h] goto HELP
10 8
if [%1]==[-help] goto HELP
11 9
if [%1]==[--help] goto HELP
12 10

  
11
setlocal EnableExtensions EnableDelayedExpansion
12
if "%ERRORLEVEL%"=="1" (
13
  echo "Error: %COMSPEC% is unable to enable extensions and delayed expansion."
14
  goto EOF
15
)
16

  
13 17
if defined ADMB_HOME (
14 18
  set ADMB_HOME=
15 19
)
......
189 193
    set parser=tpl2cpp
190 194
  )
191 195
  set CMD=!parser!!debug!!dll! !tpl!
192
  echo.&echo *** Parsing tpl file: !tpl!
196
  echo.&echo *** Parsing tpl file: !tpl!.tpl
193 197
  echo !CMD!
194 198
  call !CMD!
195 199
  if not exist !tpl!.cpp (
196
    echo.&echo Error: Unable to parse !tpl! to !tpl!.cpp.
200
    echo.&echo Error: Unable to parse !tpl!.tpl to !tpl!.cpp.
197 201
    goto ERROR
198 202
  )
199 203
  if not exist !tpl!.htp (
200
    echo.&echo Error: Unable to parse !tpl! to !tpl!.htp.
204
    echo.&echo Error: Unable to parse !tpl!.tpl to !tpl!.htp.
201 205
    goto ERROR
202 206
  )
203 207
)
......
205 209
  set tpl=%%~nb
206 210
  @REM set CMD=adcomp!d!!g!!r!!fast! !tpl!
207 211
  set CMD=!CXX!!CXXFLAGS! -o !tpl!.obj !tpl!.cpp
208
  echo.&echo *** Compiling source file: !tpl!
212
  echo.&echo *** Compiling source file: !tpl!.cpp
209 213
  echo !CMD!
210 214
  call !CMD!
211 215
  if not exist !tpl!.obj (
......
279 283
    if defined d (
280 284
      set CMD=!LL!!LDFLAGS! -def !tpl!.def --driver-name !CXX! --output-lib !tpl!.dll --output-lib lib!tpl!.a -o !tpl!.dll !objs! !libs!
281 285
    ) else (
282
      set CMD=!LL!!LDFLAGS! -o !tpl!.exe !tpl!.obj !objs! !libs!
286
      if defined objs (
287
        set CMD=!LL!!LDFLAGS! -o !tpl!.exe !tpl!.obj !objs! !libs!
288
      ) else (
289
        set CMD=!LL!!LDFLAGS! -o !tpl!.exe !tpl!.obj !libs!
290
      )
283 291
    )
284
    echo.&echo *** Linking files: !tpl!.obj !objs!
292
    if defined objs (
293
      echo.&echo *** Linking files: !tpl!.obj !objs!
294
    ) else (
295
      echo.&echo *** Linking file: !tpl!.obj
296
    )
285 297
    echo !CMD!
286 298
    call !CMD!
287 299
    if defined d (

Also available in: Unified diff