Fossil SCM

Refine the batch file used to build with MSVC to permit use of a pre-existing build environment.

mistachkin 2014-09-03 18:02 trunk
Commit 214b1d0a37487c94d0791f76a68198cea5f7885d
1 file changed +31 -14
+31 -14
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -13,10 +13,33 @@
1313
REM SET __ECHO=ECHO
1414
REM SET __ECHO2=ECHO
1515
IF NOT DEFINED _AECHO (SET _AECHO=REM)
1616
IF NOT DEFINED _CECHO (SET _CECHO=REM)
1717
IF NOT DEFINED _VECHO (SET _VECHO=REM)
18
+
19
+REM
20
+REM NOTE: Setup local environment variables that point to the root directory
21
+REM of the Fossil source checkout and to the directory containing this
22
+REM build tool.
23
+REM
24
+SET ROOT=%~dp0\..
25
+SET ROOT=%ROOT:\\=\%
26
+
27
+%_VECHO% Root = '%ROOT%'
28
+
29
+SET TOOLS=%~dp0
30
+SET TOOLS=%TOOLS:~0,-1%
31
+
32
+%_VECHO% Tools = '%TOOLS%'
33
+
34
+REM
35
+REM Visual C++ ????
36
+REM
37
+IF DEFINED VCINSTALLDIR IF EXIST "%VCINSTALLDIR%" (
38
+ %_AECHO% Build environment appears to be setup.
39
+ GOTO skip_setupVisualStudio
40
+)
1841
1942
REM
2043
REM Visual Studio ????
2144
REM
2245
IF DEFINED VSVARS32 IF EXIST "%VSVARS32%" (
@@ -121,24 +144,10 @@
121144
REM
122145
SET VSVARS32=%VSVARS32:\\=\%
123146
124147
%_VECHO% VsVars32 = '%VSVARS32%'
125148
126
-REM
127
-REM NOTE: Setup local environment variables that point to the root directory
128
-REM of the Fossil source checkout and to the directory containing this
129
-REM build tool.
130
-REM
131
-SET ROOT=%~dp0\..
132
-SET ROOT=%ROOT:\\=\%
133
-
134
-SET TOOLS=%~dp0
135
-SET TOOLS=%TOOLS:~0,-1%
136
-
137
-%_VECHO% Root = '%ROOT%'
138
-%_VECHO% Tools = '%TOOLS%'
139
-
140149
REM
141150
REM NOTE: After this point, a clean ERRORLEVEL is required; therefore, make
142151
REM sure it is reset now.
143152
REM
144153
CALL :fn_ResetErrorLevel
@@ -152,10 +161,18 @@
152161
IF ERRORLEVEL 1 (
153162
ECHO Visual Studio build environment batch file "%VSVARS32%" failed.
154163
GOTO errors
155164
)
156165
166
+REM
167
+REM NOTE: After this point, the environment should already be setup for
168
+REM building with MSVC.
169
+REM
170
+:skip_setupVisualStudio
171
+
172
+%_VECHO% VcInstallDir = '%VCINSTALLDIR%'
173
+
157174
REM
158175
REM NOTE: Attempt to create the build output directory, if necessary.
159176
REM
160177
IF NOT EXIST "%ROOT%\msvcbld" (
161178
%__ECHO% MKDIR "%ROOT%\msvcbld"
162179
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -13,10 +13,33 @@
13 REM SET __ECHO=ECHO
14 REM SET __ECHO2=ECHO
15 IF NOT DEFINED _AECHO (SET _AECHO=REM)
16 IF NOT DEFINED _CECHO (SET _CECHO=REM)
17 IF NOT DEFINED _VECHO (SET _VECHO=REM)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
19 REM
20 REM Visual Studio ????
21 REM
22 IF DEFINED VSVARS32 IF EXIST "%VSVARS32%" (
@@ -121,24 +144,10 @@
121 REM
122 SET VSVARS32=%VSVARS32:\\=\%
123
124 %_VECHO% VsVars32 = '%VSVARS32%'
125
126 REM
127 REM NOTE: Setup local environment variables that point to the root directory
128 REM of the Fossil source checkout and to the directory containing this
129 REM build tool.
130 REM
131 SET ROOT=%~dp0\..
132 SET ROOT=%ROOT:\\=\%
133
134 SET TOOLS=%~dp0
135 SET TOOLS=%TOOLS:~0,-1%
136
137 %_VECHO% Root = '%ROOT%'
138 %_VECHO% Tools = '%TOOLS%'
139
140 REM
141 REM NOTE: After this point, a clean ERRORLEVEL is required; therefore, make
142 REM sure it is reset now.
143 REM
144 CALL :fn_ResetErrorLevel
@@ -152,10 +161,18 @@
152 IF ERRORLEVEL 1 (
153 ECHO Visual Studio build environment batch file "%VSVARS32%" failed.
154 GOTO errors
155 )
156
 
 
 
 
 
 
 
 
157 REM
158 REM NOTE: Attempt to create the build output directory, if necessary.
159 REM
160 IF NOT EXIST "%ROOT%\msvcbld" (
161 %__ECHO% MKDIR "%ROOT%\msvcbld"
162
--- win/buildmsvc.bat
+++ win/buildmsvc.bat
@@ -13,10 +13,33 @@
13 REM SET __ECHO=ECHO
14 REM SET __ECHO2=ECHO
15 IF NOT DEFINED _AECHO (SET _AECHO=REM)
16 IF NOT DEFINED _CECHO (SET _CECHO=REM)
17 IF NOT DEFINED _VECHO (SET _VECHO=REM)
18
19 REM
20 REM NOTE: Setup local environment variables that point to the root directory
21 REM of the Fossil source checkout and to the directory containing this
22 REM build tool.
23 REM
24 SET ROOT=%~dp0\..
25 SET ROOT=%ROOT:\\=\%
26
27 %_VECHO% Root = '%ROOT%'
28
29 SET TOOLS=%~dp0
30 SET TOOLS=%TOOLS:~0,-1%
31
32 %_VECHO% Tools = '%TOOLS%'
33
34 REM
35 REM Visual C++ ????
36 REM
37 IF DEFINED VCINSTALLDIR IF EXIST "%VCINSTALLDIR%" (
38 %_AECHO% Build environment appears to be setup.
39 GOTO skip_setupVisualStudio
40 )
41
42 REM
43 REM Visual Studio ????
44 REM
45 IF DEFINED VSVARS32 IF EXIST "%VSVARS32%" (
@@ -121,24 +144,10 @@
144 REM
145 SET VSVARS32=%VSVARS32:\\=\%
146
147 %_VECHO% VsVars32 = '%VSVARS32%'
148
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149 REM
150 REM NOTE: After this point, a clean ERRORLEVEL is required; therefore, make
151 REM sure it is reset now.
152 REM
153 CALL :fn_ResetErrorLevel
@@ -152,10 +161,18 @@
161 IF ERRORLEVEL 1 (
162 ECHO Visual Studio build environment batch file "%VSVARS32%" failed.
163 GOTO errors
164 )
165
166 REM
167 REM NOTE: After this point, the environment should already be setup for
168 REM building with MSVC.
169 REM
170 :skip_setupVisualStudio
171
172 %_VECHO% VcInstallDir = '%VCINSTALLDIR%'
173
174 REM
175 REM NOTE: Attempt to create the build output directory, if necessary.
176 REM
177 IF NOT EXIST "%ROOT%\msvcbld" (
178 %__ECHO% MKDIR "%ROOT%\msvcbld"
179

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button