NCBI C++ Toolkit Cross Reference

C++/compilers/msvc800_prj/make.bat


  1 @ECHO OFF
  2 REM $Id: make.bat 175357 2009-11-05 19:27:51Z ivanov $
  3 REM ===========================================================================
  4 REM
  5 REM                            PUBLIC DOMAIN NOTICE
  6 REM               National Center for Biotechnology Information
  7 REM
  8 REM  This software/database is a "United States Government Work" under the
  9 REM  terms of the United States Copyright Act.  It was written as part of
 10 REM  the author's official duties as a United States Government employee and
 11 REM  thus cannot be copyrighted.  This software/database is freely available
 12 REM  to the public for use. The National Library of Medicine and the U.S.
 13 REM  Government have not placed any restriction on its use or reproduction.
 14 REM
 15 REM  Although all reasonable efforts have been taken to ensure the accuracy
 16 REM  and reliability of the software and data, the NLM and the U.S.
 17 REM  Government do not and cannot warrant the performance or results that
 18 REM  may be obtained by using this software or data. The NLM and the U.S.
 19 REM  Government disclaim all warranties, express or implied, including
 20 REM  warranties of performance, merchantability or fitness for any particular
 21 REM  purpose.
 22 REM
 23 REM  Please cite the author in any work or product based on this material.
 24 REM
 25 REM ===========================================================================
 26 REM
 27 REM Author:  Vladimir Ivanov
 28 REM
 29 REM Configure/build/check NCBI C++ tree in specified configuration(s)
 30 REM
 31 REM     make.bat <configure|build|make|check> <solution> <static|dll> <32|64> [cfgs..]
 32 REM
 33 REM     %1% - Configure, build, make (configure and build_ or check build tree.
 34 REM     %2% - Solution file name without extention (relative path from build directory).
 35 REM     %3% - Type of used libraries (static, dll).
 36 REM     %4% - 32/64-bits architerture.
 37 REM     %5% - Configuration name(s) (ALL, DebugDLL, ReleaseDLL).
 38 REM           By default build all possible configurations (ALL).
 39 REM
 40 REM ===========================================================================
 41 
 42 
 43 call msvcvars.bat > NUL
 44 
 45 SET CMD=%1%
 46 SET SOLUTION=%2%
 47 SET LIBDLL=%3%
 48 SET ARCH=%4%
 49 SET CFG=%5%
 50 
 51 SET COMPILER=msvc8
 52 IF _%SRV_NAME% == _ SET SRV_NAME=%COMPUTERNAME%
 53 
 54 IF _%CMD% == _      GOTO USAGE
 55 IF _%SOLUTION% == _ GOTO USAGE
 56 IF _%LIBDLL% == _   GOTO USAGE
 57 IF _%ARCH% == _     GOTO USAGE
 58 IF _%CFG% == _      GOTO BUILDALL
 59 IF _%CFG% == _ALL   GOTO BUILDALL
 60 GOTO CHECKCMD
 61 
 62 
 63 :USAGE
 64 
 65 ECHO FATAL: Invalid parameters. See script description.
 66 ECHO FATAL: %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
 67 GOTO ABORT
 68 
 69 
 70 :BUILDALL
 71 
 72 CALL %0 %CMD% %SOLUTION% %LIBDLL% %ARCH% ReleaseDLL DebugDLL
 73 GOTO EXIT
 74 
 75 
 76 :CHECKCMD
 77 
 78 SET ARCHW=Win32
 79 if _%ARCH%_ == _64_ SET ARCHW=x64
 80 
 81 IF _%CMD% == _configure GOTO CONFIG
 82 IF _%CMD% == _make      GOTO CONFIG
 83 IF _%CMD% == _build     GOTO BUILD
 84 IF _%CMD% == _check     GOTO CHECK
 85 
 86 ECHO The following action names are recognized: configure, build, make, check.
 87 ECHO FATAL: Unknown action name %CMD%. Please correct.
 88 GOTO ABORT
 89 
 90 
 91 REM ###########################################################################
 92 :CONFIG
 93 
 94 IF %CFG% == DebugDLL   GOTO CONTCFG
 95 IF %CFG% == DebugMT    GOTO CONTCFG
 96 IF %CFG% == ReleaseDLL GOTO CONTCFG
 97 IF %CFG% == ReleaseMT  GOTO CONTCFG
 98 ECHO The following configuration names are recognized:
 99 ECHO     DebugDLL DebugMT ReleaseDLL ReleaseMT
100 ECHO FATAL: Unknown configuration name %CFG%. Please correct.
101 GOTO ABORT
102 :CONTCFG
103 TIME /T
104 ECHO INFO: Configure "%LIBDLL%\%SOLUTION% [ReleaseDLL|%ARCH%]"
105 %DEVENV% %LIBDLL%\build\%SOLUTION%.sln /build "ReleaseDLL|%ARCHW%" /project "-CONFIGURE-"
106 IF ERRORLEVEL 1 GOTO ABORT
107 IF NOT _%CMD% == _make GOTO COMPLETE
108 
109 
110 REM ###########################################################################
111 :BUILD
112 
113 :ARGLOOPB
114 IF %CFG% == DebugDLL   GOTO CONTBLD
115 IF %CFG% == DebugMT    GOTO CONTBLD
116 IF %CFG% == ReleaseDLL GOTO CONTBLD
117 IF %CFG% == ReleaseMT  GOTO CONTBLD
118 ECHO The following configuration names are recognized:
119 ECHO     DebugDLL DebugMT ReleaseDLL ReleaseMT
120 ECHO FATAL: Unknown configuration name %CFG%. Please correct.
121 GOTO ABORT
122 :CONTBLD
123 TIME /T
124 ECHO INFO: Building "%LIBDLL%\%SOLUTION% [%CFG%|%ARCH%]"
125 %DEVENV% %LIBDLL%\build\%SOLUTION%.sln /build "%CFG%|%ARCHW%" /project "-BUILD-ALL-"
126 IF ERRORLEVEL 1 GOTO ABORT
127 SHIFT
128 IF _%5% == _ GOTO COMPLETE
129 SET CFG=%5%
130 GOTO ARGLOOPB
131 
132 
133 REM ###########################################################################
134 :CHECK
135 
136 ECHO INFO: Checking init
137 bash -c "../../scripts/common/check/check_make_win_cfg.sh init; exit $?"
138 SET ERRORLEV=0
139 :ARGLOOPC
140 IF %CFG% == DebugMT    GOTO CONTCH
141 IF %CFG% == DebugDLL   GOTO CONTCH
142 IF %CFG% == ReleaseMT  GOTO CONTCH
143 IF %CFG% == ReleaseDLL GOTO CONTCH
144 ECHO The following configuration names are recognized:
145 ECHO     DebugDLL DebugMT ReleaseDLL ReleaseMT
146 ECHO FATAL: Unknown configuration name %CFG%. Please correct.
147 GOTO ABORT
148 :CONTCH
149 ECHO INFO: Create check script for "%LIBDLL%\%SOLUTION% [%CFG%|%ARCH%]"
150 bash -c "../../scripts/common/check/check_make_win_cfg.sh create %SOLUTION% %LIBDLL% %CFG%"; exit $?"
151 IF ERRORLEVEL 1 GOTO ABORT
152 ECHO INFO: Checking "%LIBDLL%\%SOLUTION% [%CFG%|%ARCH%]"
153 SET CHECKSH=%LIBDLL%/build/%SOLUTION%.check/%CFG%/check.sh
154 bash -c "%CHECKSH% run; exit $?"
155 IF ERRORLEVEL 1 SET ERRORLEV=1
156 bash -c "cp %CHECKSH%.journal check.sh.%LIBDLL%_%CFG%.journal; cp %CHECKSH%.log check.sh.%LIBDLL%_%CFG%.log"
157 
158 REM Load testsuite results into DB works only if NCBI_AUTOMATED_BUILD is set to 1
159 IF .%NCBI_AUTOMATED_BUILD% == .1 GOTO LOADDB
160 GOTO NOLOADDB
161 :LOADDB
162 bash -c "%CHECKSH% load_to_db; exit $?"
163 IF ERRORLEVEL 1 SET ERRORLEV=1
164 :NOLOADDB
165 
166 SHIFT
167 IF _%5% == _ GOTO CHECKEND
168 SET CFG=%5%
169 GOTO ARGLOOPC
170 :CHECKEND
171 COPY /Y /B check.sh.*.journal check.sh.journal
172 COPY /Y /B check.sh.*.log     check.sh.log
173 IF %ERRORLEV%==0 GOTO COMPLETE
174 
175 
176 REM ###########################################################################
177 
178 :ABORT
179 ECHO INFO: %CMD% failed.
180 EXIT 1
181 
182 :COMPLETE
183 ECHO INFO: %CMD% complete.
184 
185 :EXIT
186 EXIT %ERRORLEVEL%

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.