forked from cdslaborg/paramonte
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildMatDRAM.bat
385 lines (300 loc) · 18.4 KB
/
buildMatDRAM.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::
:::: MIT License
::::
:::: ParaMonte: plain powerful parallel Monte Carlo library.
::::
:::: Copyright (C) 2012-present, The Computational Data Science Lab
::::
:::: This file is part of the ParaMonte library.
::::
:::: Permission is hereby granted, free of charge, to any person obtaining a
:::: copy of this software and associated documentation files (the "Software"),
:::: to deal in the Software without restriction, including without limitation
:::: the rights to use, copy, modify, merge, publish, distribute, sublicense,
:::: and/or sell copies of the Software, and to permit persons to whom the
:::: Software is furnished to do so, subject to the following conditions:
::::
:::: The above copyright notice and this permission notice shall be
:::: included in all copies or substantial portions of the Software.
::::
:::: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
:::: EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
:::: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
:::: IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
:::: DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
:::: OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
:::: OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
::::
:::: ACKNOWLEDGMENT
::::
:::: ParaMonte is an honor-ware and its currency is acknowledgment and citations.
:::: As per the ParaMonte library license agreement terms, if you use any parts of
:::: this library for any purposes, kindly acknowledge the use of ParaMonte in your
:::: work (education/research/industry/development/...) by citing the ParaMonte
:::: library as described on this page:
::::
:::: https://github.com/cdslaborg/paramonte/blob/main/ACKNOWLEDGMENT.md
::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: NOTE: This is not a standalone build-script. It must only be called by install.bat script in the root directory of the project.
set ParaMonte_ROOT_DIR=%~dp0
set ParaMonteExample_SRC_DIR=!ParaMonte_ROOT_DIR!example
set ParaMonteInterface_SRC_DIR=!ParaMonte_ROOT_DIR!src\interface
echo. -- !BUILD_SCRIPT_NAME! - project root directory: !ParaMonte_ROOT_DIR!
setlocal EnableDelayedExpansion
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: build MatDRAM library example objects and executable
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo.
echo. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo. :::: ::::
echo. MatDRAM MATLAB Library Build
echo. :::: ::::
echo. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: make bin directory
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set ParaMonte_BIN_DIR=!ParaMonte_ROOT_DIR!bin
echo. -- MatDRAM - The MatDRAM binaries directory: !ParaMonte_BIN_DIR!
if not exist !ParaMonte_BIN_DIR! (
mkdir "!ParaMonte_BIN_DIR!\"
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: setup examples' interface language
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set LANG_FILE_EXT=m
set LANG_NAME=MATLAB
if not defined LANG_NAME (
echo.
echo. -- MatDRAMExample - Fatal Error: unrecognized or no language specified. exiting...
echo.
cd %~dp0
set ERRORLEVEL=1
exit /B 1
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: build examples
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: select examples to build
set EXAM_LIST=mvn
:: set and make example directories
set MatDRAM_BLD_DIR=!ParaMonte_ROOT_DIR!build\MatDRAM
set MatDRAM_EXP_DIR=!MatDRAM_BLD_DIR!\example
set ParaMonteInterface_SRC_DIR_CURRENT=!ParaMonteInterface_SRC_DIR!\!LANG_NAME!
echo.
echo. -- MatDRAM - generating the MatDRAM library examples in !LANG_NAME! language...
echo. -- MatDRAM - The MatDRAM !LANG_NAME! examples directory: !MatDRAM_EXP_DIR!
for %%e in (!EXAM_LIST!) do (
set EXAM_NAME=%%e
set MatDRAM_BLD_DIR_CURRENT=!MatDRAM_EXP_DIR!\!EXAM_NAME!
echo. -- MatDRAM - The MatDRAM library !EXAM_NAME! example directory: !MatDRAM_BLD_DIR_CURRENT!
if exist !MatDRAM_BLD_DIR_CURRENT! (
echo. -- MatDRAM - previous example build detected. deleting the old contents...
rmdir /S /Q !MatDRAM_BLD_DIR_CURRENT! || goto LABEL_rmdirErrorOccured
echo. -- MatDRAM - regenerating the MatDRAM library !EXAM_NAME! example directory: !MatDRAM_BLD_DIR_CURRENT!
)
mkdir "!MatDRAM_BLD_DIR_CURRENT!\"
REM The MatDRAM library example required files
echo. -- MatDRAM - copying the MatDRAM library !EXAM_NAME! example required files in !LANG_NAME! language...
REM The MatDRAM library README.md file
REM echo. -- MatDRAM - copying the MatDRAM library README.md file...
REM echo. -- MatDRAM - from: !ParaMonteInterface_SRC_DIR_CURRENT!\README.md
REM echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT!\paramonte\README.md
REM copy /y "!ParaMonteInterface_SRC_DIR_CURRENT!\README.md" "!MatDRAM_BLD_DIR_CURRENT!\README.md" || goto LABEL_copyErrorOccured
REM The MatDRAM library CHANGES.md file
REM echo. -- MatDRAM - copying the MatDRAM library CHANGES.md file...
REM echo. -- MatDRAM - from: !ParaMonteInterface_SRC_DIR_CURRENT!\CHANGES.md
REM echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT!\paramonte\CHANGES.md
REM copy "!ParaMonteInterface_SRC_DIR_CURRENT!\CHANGES.md" "!MatDRAM_BLD_DIR_CURRENT!\CHANGES.md" || goto LABEL_copyErrorOccured
REM The MatDRAM library license file
echo. -- MatDRAM - copying the MatDRAM library license file...
echo. -- MatDRAM - from: !ParaMonte_ROOT_DIR!LICENSE.md
echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT!\LICENSE.md
copy "!ParaMonte_ROOT_DIR!LICENSE.md" "!MatDRAM_BLD_DIR_CURRENT!\LICENSE.md" || goto LABEL_copyErrorOccured
REM The MatDRAM library README file
echo. -- MatDRAM - copying the MatDRAM library license file...
echo. -- MatDRAM - from: !ParaMonteInterface_SRC_DIR_CURRENT!\README.MatDRAM.md
echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT!\README.MatDRAM.md
copy "!ParaMonteInterface_SRC_DIR_CURRENT!\README.MatDRAM.md" "!MatDRAM_BLD_DIR_CURRENT!\README.md" || goto LABEL_copyErrorOccured
REM The MatDRAM library interface files
echo. -- MatDRAM - from: !ParaMonteInterface_SRC_DIR_CURRENT!\MatDRAM %= no need for final slash here =%
echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT!\paramonte\ %= final slash tells this is folder =%
xcopy /s /Y "!ParaMonteInterface_SRC_DIR_CURRENT!\paramonte" "!MatDRAM_BLD_DIR_CURRENT!\paramonte\" || goto LABEL_copyErrorOccured
REM The MatDRAM library ParaDRAM class method files, required for postprocess reading of output of data
set COPY_PATH_SOURCE=!ParaMonteInterface_SRC_DIR_CURRENT!\paramonte\interface\@ParaDRAM\readMarkovChain.m
set COPY_PATH_DESTIN=!MatDRAM_BLD_DIR_CURRENT!\paramonte\kernel\@ParaDRAM_class\
echo. -- MatDRAM - from: !COPY_PATH_SOURCE!
echo. -- MatDRAM - to: !COPY_PATH_DESTIN!
xcopy /s /Y "!COPY_PATH_SOURCE!" "!COPY_PATH_DESTIN!" || goto LABEL_copyErrorOccured
set COPY_PATH_SOURCE=!ParaMonteInterface_SRC_DIR_CURRENT!\paramonte\interface\@ParaMonteSampler\readChain.m
set COPY_PATH_DESTIN=!MatDRAM_BLD_DIR_CURRENT!\paramonte\kernel\@ParaDRAM_class\
echo. -- MatDRAM - from: !COPY_PATH_SOURCE!
echo. -- MatDRAM - to: !COPY_PATH_DESTIN!
xcopy /s /Y "!COPY_PATH_SOURCE!" "!COPY_PATH_DESTIN!" || goto LABEL_copyErrorOccured
set COPY_PATH_SOURCE=!ParaMonteInterface_SRC_DIR_CURRENT!\paramonte\interface\@ParaMonteSampler\readSample.m
set COPY_PATH_DESTIN=!MatDRAM_BLD_DIR_CURRENT!\paramonte\kernel\@ParaDRAM_class\
echo. -- MatDRAM - from: !COPY_PATH_SOURCE!
echo. -- MatDRAM - to: !COPY_PATH_DESTIN!
xcopy /s /Y "!COPY_PATH_SOURCE!" "!COPY_PATH_DESTIN!" || goto LABEL_copyErrorOccured
set COPY_PATH_SOURCE=!ParaMonteInterface_SRC_DIR_CURRENT!\paramonte\interface\@ParaMonteSampler\readRestart.m
set COPY_PATH_DESTIN=!MatDRAM_BLD_DIR_CURRENT!\paramonte\kernel\@ParaDRAM_class\
echo. -- MatDRAM - from: !COPY_PATH_SOURCE!
echo. -- MatDRAM - to: !COPY_PATH_DESTIN!
xcopy /s /Y "!COPY_PATH_SOURCE!" "!COPY_PATH_DESTIN!" || goto LABEL_copyErrorOccured
set COPY_PATH_SOURCE=!ParaMonteInterface_SRC_DIR_CURRENT!\paramonte\interface\@ParaMonteSampler\readReport.m
set COPY_PATH_DESTIN=!MatDRAM_BLD_DIR_CURRENT!\paramonte\kernel\@ParaDRAM_class\
echo. -- MatDRAM - from: !COPY_PATH_SOURCE!
echo. -- MatDRAM - to: !COPY_PATH_DESTIN!
xcopy /s /Y "!COPY_PATH_SOURCE!" "!COPY_PATH_DESTIN!" || goto LABEL_copyErrorOccured
set COPY_PATH_SOURCE=!ParaMonteInterface_SRC_DIR_CURRENT!\paramonte\interface\@ParaMonteSampler\readTabular.m
set COPY_PATH_DESTIN=!MatDRAM_BLD_DIR_CURRENT!\paramonte\kernel\@ParaDRAM_class\
echo. -- MatDRAM - from: !COPY_PATH_SOURCE!
echo. -- MatDRAM - to: !COPY_PATH_DESTIN!
xcopy /s /Y "!COPY_PATH_SOURCE!" "!COPY_PATH_DESTIN!" || goto LABEL_copyErrorOccured
REM set COPY_PATH_SOURCE=!ParaMonteInterface_SRC_DIR_CURRENT!\paramonte\interface\@ParaMonteSampler\readReport.m
REM set COPY_PATH_DESTIN=!MatDRAM_BLD_DIR_CURRENT!\paramonte\kernel\@ParaDRAM_class\
REM echo. -- MatDRAM - from: !COPY_PATH_SOURCE!
REM echo. -- MatDRAM - to: !COPY_PATH_DESTIN!
REM xcopy /s /Y "!COPY_PATH_SOURCE!" "!COPY_PATH_DESTIN!" || goto LABEL_copyErrorOccured
set COPY_PATH_SOURCE=!ParaMonteInterface_SRC_DIR_CURRENT!\paramonte\interface\@ParaMonteSampler\getFilePathList.m
set COPY_PATH_DESTIN=!MatDRAM_BLD_DIR_CURRENT!\paramonte\kernel\@ParaDRAM_class\
echo. -- MatDRAM - from: !COPY_PATH_SOURCE!
echo. -- MatDRAM - to: !COPY_PATH_DESTIN!
xcopy /s /Y "!COPY_PATH_SOURCE!" "!COPY_PATH_DESTIN!" || goto LABEL_copyErrorOccured
REM The MatDRAM library banner file
echo. -- MatDRAM - copying the MatDRAM library auxiliary files
echo. -- MatDRAM - from: !ParaMonteInterface_SRC_DIR!\auxil %= no need for final slash here =%
echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT!\paramonte\auxil\ %= final slash tells this is folder =%
xcopy /s /Y "!ParaMonteInterface_SRC_DIR!\auxil" "!MatDRAM_BLD_DIR_CURRENT!\paramonte\auxil\" || goto LABEL_copyErrorOccured
echo.
REM The MatDRAM library kernel version file (must appear only after the above)
echo. -- MatDRAM - copying the MatDRAM library kernel version file...
echo. -- MatDRAM - from: !ParaMonte_ROOT_DIR!.VERSION %= no need for final slash here =%
echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT!\paramonte\auxil\.VERSION_KERNEL
copy /y "!ParaMonte_ROOT_DIR!.VERSION" "!MatDRAM_BLD_DIR_CURRENT!\paramonte\auxil\.VERSION_KERNEL" || goto LABEL_copyErrorOccured
REM The MatDRAM library interface version file (must appear only after the above)
echo. -- MatDRAM - copying the MatDRAM library interface version file...
echo. -- MatDRAM - from: !ParaMonteInterface_SRC_DIR_CURRENT!\.VERSION %= no need for final slash here =%
echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT!\paramonte\auxil\.VERSION_INTERFACE
copy /y "!ParaMonteInterface_SRC_DIR_CURRENT!\.VERSION" "!MatDRAM_BLD_DIR_CURRENT!\paramonte\auxil\.VERSION_INTERFACE" || goto LABEL_copyErrorOccured
REM The MatDRAM library example input files
REM set ParaMonteExample_INP_DIR_CURRENT=!ParaMonteExample_SRC_DIR!\!EXAM_NAME!\input
REM echo. -- MatDRAM - copying the MatDRAM library !EXAM_NAME! example input files in !LANG_NAME! language...
REM echo. -- MatDRAM - from: !ParaMonteExample_INP_DIR_CURRENT! %= no need for final slash here =%
REM echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT!\ %= final slash tells this is folder =%
REM xcopy /s /Y "!ParaMonteExample_INP_DIR_CURRENT!" "!MatDRAM_BLD_DIR_CURRENT!\" || goto LABEL_copyErrorOccured
REM The MatDRAM library example source files
set ParaMonteExample_SRC_DIR_CURRENT=!ParaMonteExample_SRC_DIR!\!EXAM_NAME!\!LANG_NAME!
echo. -- MatDRAM - copying the MatDRAM library !EXAM_NAME! example source files in !LANG_NAME! language...
set mainFileName=main.!LANG_FILE_EXT!
copy "!ParaMonteExample_SRC_DIR!\!mainFileName!" "!MatDRAM_BLD_DIR_CURRENT!\" || goto LABEL_copyErrorOccured
echo. -- MatDRAM - from: !ParaMonteExample_SRC_DIR_CURRENT! %= no need for final slash here =%
echo. -- MatDRAM - to: !MatDRAM_BLD_DIR_CURRENT! %= final slash tells this is folder =%
xcopy /s /Y "!ParaMonteExample_SRC_DIR_CURRENT!" "!MatDRAM_BLD_DIR_CURRENT!\" || goto LABEL_copyErrorOccured
)
echo.
if %ERRORLEVEL%==1 (
echo.
echo. -- MatDRAM - Fatal Error: build failed. exiting...
echo.
cd %~dp0
set ERRORLEVEL=1
exit /B 1
)
if %ERRORLEVEL%==0 (
echo.
echo.
echo. -- MatDRAM - The MatDRAM library example build successful.
echo.
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: copy the first example to the bin directory
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set MatDRAM_BLD_DIR_CURRENT=!MatDRAM_EXP_DIR!\mvn
set MatDRAMExample_BIN_DIR_CURRENT=!ParaMonte_BIN_DIR!\libparamonte_matdram
echo. -- MatDRAM - The MatDRAM !LANG_NAME! library binary directory: !MatDRAMExample_BIN_DIR_CURRENT!
if not exist !MatDRAMExample_BIN_DIR_CURRENT! (
mkdir "!MatDRAMExample_BIN_DIR_CURRENT!\"
)
echo. -- MatDRAM - copying the MatDRAM library files to the bin folder...
echo. -- MatDRAM - from: !MatDRAM_BLD_DIR_CURRENT! %= no need for final slash here =%
echo. -- MatDRAM - to: !MatDRAMExample_BIN_DIR_CURRENT! %= final slash tells this is folder =%
xcopy /s /Y /e /v /i "!MatDRAM_BLD_DIR_CURRENT!" "!MatDRAMExample_BIN_DIR_CURRENT!" || goto LABEL_copyErrorOccured
if %ERRORLEVEL%==1 (
echo.
echo. -- MatDRAM - Fatal Error: build failed. exiting...
echo.
cd %~dp0
set ERRORLEVEL=1
exit /B 1
)
if %ERRORLEVEL%==0 (
echo.
echo.
echo. -- MatDRAM - The MatDRAM library example build successful.
echo.
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: build test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set MatDRAMTest_BLD_DIR=!MatDRAM_BLD_DIR!\test
set MatDRAMTest_SRC_DIR=!ParaMonteInterface_SRC_DIR_CURRENT!\test
echo. -- MatDRAM - copying the MatDRAM library files to the test folder...
echo. -- MatDRAM - from: !MatDRAM_BLD_DIR_CURRENT! %= no need for final slash here =%
echo. -- MatDRAM - to: !MatDRAMTest_BLD_DIR! %= final slash tells this is folder =%
xcopy /s /Y /e /v /i "!MatDRAM_BLD_DIR_CURRENT!" "!MatDRAMTest_BLD_DIR!" || goto LABEL_copyErrorOccured
cd !MatDRAMTest_BLD_DIR! && del main.m logfunc.m LICENSE.md
copy /y "!MatDRAMTest_SRC_DIR!\testParaMonte.m" "!MatDRAMTest_BLD_DIR!\testParaMonte.m" || goto LABEL_copyErrorOccured
copy /y "!MatDRAMTest_SRC_DIR!\getLogFunc.m" "!MatDRAMTest_BLD_DIR!\getLogFunc.m" || goto LABEL_copyErrorOccured
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: copy the first example to the bin directory
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if !ParaMonteExample_RUN_ENABLED!==true (
for %%e in (!EXAM_LIST!) do (
set EXAM_NAME=%%e
echo. -- MatDRAM - Running the MatDRAM library's !EXAM_NAME! example.
REM The MatDRAM library example build and run if requested
set MatDRAM_BLD_DIR_CURRENT=!MatDRAM_EXP_DIR!\!EXAM_NAME!
cd !MatDRAM_BLD_DIR_CURRENT!
matlab -batch "main" && (
echo.
echo.
echo. -- MatDRAM - The MatDRAM library example build/run appears to have succeeded.
echo.
) || (
echo.
echo. -- MatDRAM - Fatal Error: The MatDRAM library example build/run failed. exiting...
echo.
cd %~dp0
set ERRORLEVEL=1
exit /B 1
)
cd %~dp0
)
)
echo.
echo.-- MatDRAM - the MatDRAM build files are located at: !MatDRAM_BLD_DIR_CURRENT! %= no need for final slash here =%
echo.-- MatDRAM - the MatDRAM library files are located at: !MatDRAMExample_BIN_DIR_CURRENT! %= final slash tells this is folder =%
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: quit
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
cd %~dp0
exit /B 0
:LABEL_copyErrorOccured
echo.
echo. -- MatDRAM - Fatal Error: failed to copy contents. exiting...
echo.
cd %~dp0
set ERRORLEVEL=1
exit /B 1
:LABEL_rmdirErrorOccured
echo.
echo. -- MatDRAM - Fatal Error: failed to delete old contents. exiting...
echo.
cd %~dp0
set ERRORLEVEL=1
exit /B 1