Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Git submodule update to build.bat #739

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ set RUNTIMEAS=dll
set SRCDIR=%~dp0
set MAKETARGET=all-dlls
set SKIPVS=no
set SKIPSUBMODULE=no

if "%WORKAREA%"=="" goto needargument

Expand All @@ -29,6 +30,7 @@ if defined ARG (
if "%ARG%"=="/test" set MAKETARGET=test && goto argloop
if "%ARG%"=="/test-more" set MAKETARGET=test-more && goto argloop
if "%ARG%"=="/keepvs" set SKIPVS=yes && goto argloop
if "%ARG%"=="/as-is" set SKIPSUBMODULE=yes && goto argloop
echo Unrecognized argument %ARG%
exit /B 1
)
Expand All @@ -45,6 +47,13 @@ if "%VSCONFIG%"=="" (
exit /B 1
)

if %SKIPSUBMODULE%==yes goto postsubmodule
if not exist .git goto postsubmodule
where git > NUL 2>&1
if %ERRORLEVEL% neq 0 goto postsubmodule
git submodule update --init --depth 1
:postsubmodule

if not exist %WORKAREA% mkdir %WORKAREA%

echo srcdir=%SRCDIR% > %WORKAREA%\Mf-config
Expand Down