2019-08-28 23:18:30 +02:00
|
|
|
@echo off
|
2020-11-25 14:27:52 +01:00
|
|
|
setlocal EnableDelayedExpansion EnableExtensions
|
2019-08-28 23:18:30 +02:00
|
|
|
|
2020-11-25 14:27:52 +01:00
|
|
|
REM Option flags
|
2020-11-21 12:02:03 +01:00
|
|
|
set /a valid_cc=0
|
|
|
|
set /a use_local=0
|
|
|
|
set /a verbose_log=0
|
2020-11-25 14:27:52 +01:00
|
|
|
set /a shift_counter=0
|
2019-08-28 23:18:30 +02:00
|
|
|
|
2020-11-25 14:27:52 +01:00
|
|
|
REM Option variables
|
2020-11-21 12:02:03 +01:00
|
|
|
set log_file="%TEMP%\v_make.log"
|
2020-11-25 14:27:52 +01:00
|
|
|
set compiler=""
|
|
|
|
set target=""
|
2020-11-21 12:02:03 +01:00
|
|
|
|
|
|
|
REM tcc variables
|
2020-11-25 14:27:52 +01:00
|
|
|
set "tcc_url=https://github.com/vlang/tccbin_win.git"
|
|
|
|
set "tcc_dir=%~dp0thirdparty\tcc"
|
|
|
|
set "vc_url=https://github.com/vlang/vc.git"
|
|
|
|
set "vc_dir=%~dp0vc"
|
2020-07-16 18:33:26 +02:00
|
|
|
|
2020-11-25 14:27:52 +01:00
|
|
|
REM Let a particular environment specify their own tcc repo
|
|
|
|
if /I not ["%TCC_GIT%"] == [""] set "tcc_url=%TCC_GIT%"
|
2020-07-16 18:33:26 +02:00
|
|
|
|
2020-11-21 12:02:03 +01:00
|
|
|
pushd %~dp0
|
2020-07-16 18:33:26 +02:00
|
|
|
|
2020-11-21 12:02:03 +01:00
|
|
|
:verifyopt
|
2020-11-25 14:27:52 +01:00
|
|
|
REM Read stdin EOF
|
2020-11-21 12:02:03 +01:00
|
|
|
if ["%~1"] == [""] goto :init
|
2020-07-16 18:33:26 +02:00
|
|
|
|
2020-11-25 14:27:52 +01:00
|
|
|
REM Target options
|
|
|
|
if !shift_counter! LSS 1 (
|
|
|
|
if "%~1" == "build" set target="build"& shift& set /a shift_counter+=1& goto :verifyopt
|
|
|
|
if "%~1" == "clean" set target="clean"& shift& set /a shift_counter+=1& goto :verifyopt
|
|
|
|
if "%~1" == "clean-all" set target="clean-all"& shift& set /a shift_counter+=1& goto :verifyopt
|
|
|
|
if "%~1" == "help" (
|
|
|
|
if "%~2" == "build" call :help_build& exit /b %ERRORLEVEL%
|
|
|
|
if "%~2" == "clean" call :help_clean& exit /b %ERRORLEVEL%
|
|
|
|
if "%~2" == "clean-all" call :help_cleanall& exit /b %ERRORLEVEL%
|
|
|
|
if "%~2" == "help" call :help_help& exit /b %ERRORLEVEL%
|
|
|
|
if ["%~2"] == [""] call :usage& exit /b %ERRORLEVEL%
|
|
|
|
shift
|
|
|
|
)
|
|
|
|
)
|
2020-06-04 14:07:02 +02:00
|
|
|
|
2020-11-25 14:27:52 +01:00
|
|
|
REM Compiler option
|
|
|
|
if "%~1" == "-gcc" set compiler="gcc"& set /a shift_counter+=1& shift& goto :verifyopt
|
|
|
|
if "%~1" == "-msvc" set compiler="msvc"& set /a shift_counter+=1& shift& goto :verifyopt
|
|
|
|
if "%~1" == "-tcc" set compiler="tcc"& set /a shift_counter+=1& shift& goto :verifyopt
|
|
|
|
if "%~1" == "-fresh-tcc" set compiler="fresh-tcc"& set /a shift_counter+=1& shift& goto :verifyopt
|
|
|
|
if "%~1" == "-clang" set compiler="clang"& set /a shift_counter+=1& shift& goto :verifyopt
|
|
|
|
|
|
|
|
REM Standard options
|
|
|
|
if "%~1" == "--local" (
|
|
|
|
if !use_local! EQU 0 set /a use_local=1
|
|
|
|
set /a shift_counter+=1
|
2020-11-21 12:02:03 +01:00
|
|
|
shift
|
|
|
|
goto :verifyopt
|
2019-08-28 23:18:30 +02:00
|
|
|
)
|
2020-11-21 12:02:03 +01:00
|
|
|
if "%~1" == "-v" (
|
2020-11-25 14:27:52 +01:00
|
|
|
if !verbose_log! EQU 0 set /a verbose_log=1
|
|
|
|
set /a shift_counter+=1
|
2020-11-21 12:02:03 +01:00
|
|
|
shift
|
|
|
|
goto :verifyopt
|
|
|
|
)
|
|
|
|
if "%~1" == "--verbose" (
|
2020-11-25 14:27:52 +01:00
|
|
|
if !verbose_log! EQU 0 set /a verbose_log=1
|
|
|
|
set /a shift_counter+=1
|
2020-11-21 12:02:03 +01:00
|
|
|
shift
|
|
|
|
goto :verifyopt
|
|
|
|
)
|
2020-11-25 14:27:52 +01:00
|
|
|
if "%~1" == "--logfile" (
|
|
|
|
if ["%~2"] == [""] (
|
2020-11-21 12:02:03 +01:00
|
|
|
echo Log file is not specified for -logfile parameter. 1>&2
|
|
|
|
exit /b 2
|
|
|
|
)
|
|
|
|
pushd "%~dp2" 2>NUL || (
|
|
|
|
echo The log file specified for -logfile parameter does not exist. 1>&2
|
|
|
|
exit /b 2
|
|
|
|
)
|
|
|
|
popd
|
|
|
|
set log_file="%~sf2"
|
2020-11-25 14:27:52 +01:00
|
|
|
set /a shift_counter+=2
|
2020-11-21 12:02:03 +01:00
|
|
|
shift
|
|
|
|
shift
|
|
|
|
goto :verifyopt
|
|
|
|
)
|
2020-11-25 14:27:52 +01:00
|
|
|
echo Undefined option: %~1
|
|
|
|
exit /b 2
|
2019-08-28 23:18:30 +02:00
|
|
|
|
2020-11-21 12:02:03 +01:00
|
|
|
:init
|
2020-11-25 14:27:52 +01:00
|
|
|
if !target! == "build" goto :build
|
|
|
|
if !target! == "clean" echo Cleanup build artifacts& goto :clean
|
|
|
|
if !target! == "clean-all" echo Cleanup all& goto :cleanall
|
|
|
|
if [!target!] == [""] goto :build
|
|
|
|
|
|
|
|
:build
|
2020-11-21 12:02:03 +01:00
|
|
|
del !log_file!>NUL 2>&1
|
|
|
|
if !use_local! NEQ 1 (
|
2020-11-25 14:27:52 +01:00
|
|
|
pushd "%vc_dir%" 2>NUL&& (
|
2020-11-21 12:02:03 +01:00
|
|
|
echo Updating vc...
|
2020-11-25 14:27:52 +01:00
|
|
|
echo ^> Sync with remote !vc_url!
|
|
|
|
call :buildcmd "cd "%vc_dir%"" " "
|
2020-11-21 12:02:03 +01:00
|
|
|
call :buildcmd "git pull --quiet" " "
|
|
|
|
call :buildcmd "cd .." " "
|
2020-11-25 14:27:52 +01:00
|
|
|
) || (
|
2020-11-21 12:02:03 +01:00
|
|
|
echo Cloning vc...
|
2020-11-25 14:27:52 +01:00
|
|
|
echo ^> Cloning from remote !vc_url!
|
|
|
|
call :buildcmd "git clone --depth 1 --quiet "%vc_url%"" " "
|
2020-11-21 12:02:03 +01:00
|
|
|
)
|
2020-11-25 14:27:52 +01:00
|
|
|
popd
|
2020-11-21 12:02:03 +01:00
|
|
|
)
|
2019-08-29 23:13:53 +02:00
|
|
|
|
2020-06-19 12:54:56 +02:00
|
|
|
echo.
|
2020-11-21 12:02:03 +01:00
|
|
|
echo Building V...
|
|
|
|
|
2020-11-25 14:27:52 +01:00
|
|
|
if !compiler! == "clang" goto :clang_strap
|
|
|
|
if !compiler! == "gcc" goto :gcc_strap
|
|
|
|
if !compiler! == "msvc" goto :msvc_strap
|
|
|
|
if !compiler! == "tcc" goto :tcc_strap
|
|
|
|
if !compiler! == "fresh-tcc" goto :tcc_strap
|
|
|
|
if [!compiler!] == [""] goto :clang_strap
|
2020-11-21 12:02:03 +01:00
|
|
|
|
|
|
|
:clang_strap
|
|
|
|
where /q clang
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
echo ^> Clang not found
|
2020-11-25 14:27:52 +01:00
|
|
|
if not [!compiler!] == [""] goto :error
|
2020-11-21 12:02:03 +01:00
|
|
|
goto :gcc_strap
|
|
|
|
)
|
|
|
|
|
|
|
|
set /a valid_cc=1
|
|
|
|
|
|
|
|
echo ^> Attempting to build v.c with Clang
|
2020-11-25 14:27:52 +01:00
|
|
|
call :buildcmd "clang -std=c99 -municode -w -o v.exe .\vc\v_win.c" " "
|
2020-11-21 12:02:03 +01:00
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
REM In most cases, compile errors happen because the version of Clang installed is too old
|
2020-11-25 14:27:52 +01:00
|
|
|
call :buildcmd "clang --version" " "
|
2020-11-21 12:02:03 +01:00
|
|
|
goto :compile_error
|
|
|
|
)
|
|
|
|
|
|
|
|
echo ^> Compiling with .\v.exe self
|
|
|
|
call :buildcmd "v.exe -cc clang self" " "
|
|
|
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
|
|
|
goto :success
|
2019-08-29 23:13:53 +02:00
|
|
|
|
2020-11-21 12:02:03 +01:00
|
|
|
:gcc_strap
|
2020-06-19 12:54:56 +02:00
|
|
|
where /q gcc
|
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
|
|
|
echo ^> GCC not found
|
2020-11-25 14:27:52 +01:00
|
|
|
if not [!compiler!] == [""] goto :error
|
2020-03-18 18:15:33 +01:00
|
|
|
goto :msvc_strap
|
2019-08-29 23:13:53 +02:00
|
|
|
)
|
|
|
|
|
2020-11-21 12:02:03 +01:00
|
|
|
set /a valid_cc=1
|
|
|
|
|
|
|
|
echo ^> Attempting to build v.c with GCC
|
|
|
|
call :buildcmd "gcc -std=c99 -municode -w -o v.exe .\vc\v_win.c" " "
|
2020-07-10 21:50:29 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
2020-11-25 14:27:52 +01:00
|
|
|
REM In most cases, compile errors happen because the version of GCC installed is too old
|
|
|
|
call :buildcmd "gcc --version" " "
|
2020-07-10 21:50:29 +02:00
|
|
|
goto :compile_error
|
|
|
|
)
|
2019-08-29 23:13:53 +02:00
|
|
|
|
2020-07-16 18:33:26 +02:00
|
|
|
echo ^> Compiling with .\v.exe self
|
2020-11-21 12:02:03 +01:00
|
|
|
call :buildcmd "v.exe self" " "
|
2020-06-19 12:54:56 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
2019-08-29 23:13:53 +02:00
|
|
|
goto :success
|
|
|
|
|
2020-03-18 18:15:33 +01:00
|
|
|
:msvc_strap
|
2019-10-16 01:54:35 +02:00
|
|
|
set VsWhereDir=%ProgramFiles(x86)%
|
|
|
|
set HostArch=x64
|
|
|
|
if "%PROCESSOR_ARCHITECTURE%" == "x86" (
|
2020-03-18 18:15:33 +01:00
|
|
|
echo Using x86 Build Tools...
|
|
|
|
set VsWhereDir=%ProgramFiles%
|
|
|
|
set HostArch=x86
|
2019-10-16 01:54:35 +02:00
|
|
|
)
|
2020-06-19 12:54:56 +02:00
|
|
|
|
|
|
|
if not exist "%VsWhereDir%\Microsoft Visual Studio\Installer\vswhere.exe" (
|
|
|
|
echo ^> MSVC not found
|
2020-11-25 14:27:52 +01:00
|
|
|
if not [!compiler!] == [""] goto :error
|
2020-06-19 12:54:56 +02:00
|
|
|
goto :tcc_strap
|
|
|
|
)
|
|
|
|
|
2020-11-21 12:02:03 +01:00
|
|
|
set /a valid_cc=1
|
|
|
|
|
2019-10-16 01:54:35 +02:00
|
|
|
for /f "usebackq tokens=*" %%i in (`"%VsWhereDir%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
|
2020-03-18 18:15:33 +01:00
|
|
|
set InstallDir=%%i
|
2019-08-28 23:38:09 +02:00
|
|
|
)
|
2019-08-28 23:18:30 +02:00
|
|
|
|
2019-08-29 23:13:53 +02:00
|
|
|
if exist "%InstallDir%\Common7\Tools\vsdevcmd.bat" (
|
2020-06-19 12:54:56 +02:00
|
|
|
call "%InstallDir%\Common7\Tools\vsdevcmd.bat" -arch=%HostArch% -host_arch=%HostArch% -no_logo > NUL
|
2020-05-06 12:05:52 +02:00
|
|
|
) else if exist "%VsWhereDir%\Microsoft Visual Studio 14.0\Common7\Tools\vsdevcmd.bat" (
|
2020-06-19 12:54:56 +02:00
|
|
|
call "%VsWhereDir%\Microsoft Visual Studio 14.0\Common7\Tools\vsdevcmd.bat" -arch=%HostArch% -host_arch=%HostArch% -no_logo > NUL
|
2019-08-29 23:13:53 +02:00
|
|
|
)
|
|
|
|
|
2019-12-22 20:59:51 +01:00
|
|
|
set ObjFile=.v.c.obj
|
|
|
|
|
2020-11-21 12:02:03 +01:00
|
|
|
echo ^> Attempting to build v.c with MSVC
|
|
|
|
call :buildcmd "cl.exe /volatile:ms /Fo%ObjFile% /O2 /MD /D_VBOOTSTRAP vc\v_win.c user32.lib kernel32.lib advapi32.lib shell32.lib /link /nologo /out:v.exe /incremental:no" " "
|
2020-06-19 12:54:56 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
2019-08-29 23:13:53 +02:00
|
|
|
|
2020-07-16 18:33:26 +02:00
|
|
|
echo ^> Compiling with .\v.exe self
|
2020-11-21 12:02:03 +01:00
|
|
|
call :buildcmd "v.exe -cc msvc self" " "
|
|
|
|
del %ObjFile%>>!log_file! 2>>&1
|
2020-06-19 12:54:56 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
|
|
|
goto :success
|
|
|
|
|
|
|
|
:tcc_strap
|
|
|
|
where /q tcc
|
2019-09-17 13:56:32 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 (
|
2020-11-25 14:27:52 +01:00
|
|
|
if !compiler! == "fresh-tcc" (
|
2020-11-21 12:02:03 +01:00
|
|
|
echo ^> Clean TCC directory
|
2020-11-25 14:27:52 +01:00
|
|
|
call :buildcmd "rmdir /s /q "%tcc_dir%"" " "
|
2020-11-21 12:02:03 +01:00
|
|
|
set /a valid_cc=1
|
2020-11-25 14:27:52 +01:00
|
|
|
) else if !compiler! == "tcc" set /a valid_cc=1
|
|
|
|
if not exist %tcc_dir% (
|
2020-11-21 12:02:03 +01:00
|
|
|
echo ^> TCC not found
|
|
|
|
echo ^> Downloading TCC from %tcc_url%
|
2020-11-25 14:27:52 +01:00
|
|
|
call :buildcmd "git clone --depth 1 --quiet "!tcc_url!" "%tcc_dir%"" " "
|
2020-11-21 12:02:03 +01:00
|
|
|
)
|
|
|
|
pushd %tcc_dir% || (
|
|
|
|
echo ^> TCC not found, even after cloning
|
|
|
|
goto :error
|
|
|
|
)
|
|
|
|
popd
|
2020-11-25 14:27:52 +01:00
|
|
|
set "tcc_exe=%tcc_dir%\tcc.exe"
|
2020-06-19 12:54:56 +02:00
|
|
|
) else (
|
2020-11-21 12:02:03 +01:00
|
|
|
for /f "delims=" %%i in ('where tcc') do set "tcc_exe=%%i"
|
|
|
|
set /a valid_cc=1
|
2019-08-29 23:13:53 +02:00
|
|
|
)
|
|
|
|
|
2020-11-21 12:02:03 +01:00
|
|
|
echo ^> Updating prebuilt TCC...
|
2020-11-25 14:27:52 +01:00
|
|
|
pushd "%tcc_dir%\"
|
2020-11-21 12:02:03 +01:00
|
|
|
call :buildcmd "git pull -q" " "
|
|
|
|
popd
|
|
|
|
|
|
|
|
echo ^> Attempting to build v.c with TCC
|
|
|
|
call :buildcmd ""!tcc_exe!" -std=c99 -municode -lws2_32 -lshell32 -ladvapi32 -bt10 -w -o v.exe vc\v_win.c" " "
|
2020-06-19 12:54:56 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
2019-08-28 23:18:30 +02:00
|
|
|
|
2020-07-16 18:33:26 +02:00
|
|
|
echo ^> Compiling with .\v.exe self
|
2020-11-21 12:02:03 +01:00
|
|
|
call :buildcmd "v.exe -cc "!tcc_exe!" self" " "
|
2020-06-19 12:54:56 +02:00
|
|
|
if %ERRORLEVEL% NEQ 0 goto :compile_error
|
|
|
|
goto :success
|
2019-08-29 23:13:53 +02:00
|
|
|
|
2020-11-25 14:27:52 +01:00
|
|
|
:cleanall
|
|
|
|
call :clean
|
|
|
|
echo ^> Purge TCC binaries
|
|
|
|
call :buildcmd "rmdir /s /q "%tcc_dir%"" " "
|
|
|
|
echo ^> Purge vc repository
|
|
|
|
call :buildcmd "rmdir /s /q "%vc_dir%"" " "
|
|
|
|
exit /b 0
|
|
|
|
|
|
|
|
:clean
|
|
|
|
echo ^> Purge debug symbols
|
|
|
|
call :buildcmd "del *.pdb *.lib *.bak *.out *.ilk *.exp *.obj *.o *.a *.so" " "
|
|
|
|
echo ^> Delete old V executable
|
|
|
|
call :buildcmd "del v_old.exe v*.exe" " "
|
|
|
|
exit /b 0
|
|
|
|
|
2020-03-18 18:15:33 +01:00
|
|
|
:compile_error
|
2020-07-10 21:50:29 +02:00
|
|
|
echo.
|
2020-11-21 12:02:03 +01:00
|
|
|
type !log_file!>NUL 2>&1
|
2019-08-29 23:13:53 +02:00
|
|
|
goto :error
|
|
|
|
|
|
|
|
:error
|
2020-06-19 12:54:56 +02:00
|
|
|
echo.
|
2019-08-29 23:13:53 +02:00
|
|
|
echo Exiting from error
|
|
|
|
exit /b 1
|
|
|
|
|
|
|
|
:success
|
2020-06-19 12:54:56 +02:00
|
|
|
echo ^> V built successfully!
|
2020-07-16 18:33:26 +02:00
|
|
|
echo ^> To add V to your PATH, run `.\v.exe symlink`.
|
2020-11-21 12:02:03 +01:00
|
|
|
if !valid_cc! EQU 0 (
|
|
|
|
echo.
|
|
|
|
echo WARNING: No C compiler was detected in your PATH. `tcc` was used temporarily
|
|
|
|
echo to build V, but it may have some bugs and may not work in all cases.
|
|
|
|
echo A more advanced C compiler like GCC or MSVC is recommended.
|
|
|
|
echo https://github.com/vlang/v/wiki/Installing-a-C-compiler-on-Windows
|
|
|
|
echo.
|
|
|
|
)
|
|
|
|
|
2020-11-25 14:27:52 +01:00
|
|
|
del v_old.exe>>!log_file! 2>NUL
|
|
|
|
del !log_file! 2>NUL
|
2020-06-19 12:54:56 +02:00
|
|
|
|
|
|
|
:version
|
|
|
|
echo.
|
|
|
|
echo | set /p="V version: "
|
2020-07-16 18:33:26 +02:00
|
|
|
.\v.exe version
|
2020-11-25 14:27:52 +01:00
|
|
|
goto :eof
|
2020-11-21 12:02:03 +01:00
|
|
|
|
|
|
|
:buildcmd
|
|
|
|
if !verbose_log! EQU 1 (
|
|
|
|
echo [Debug] %~1>>!log_file!
|
|
|
|
echo %~2 %~1
|
2020-06-19 12:54:56 +02:00
|
|
|
)
|
2020-11-21 12:02:03 +01:00
|
|
|
%~1>>!log_file! 2>>&1
|
|
|
|
exit /b %ERRORLEVEL%
|
2020-06-19 12:54:56 +02:00
|
|
|
|
2020-11-21 12:02:03 +01:00
|
|
|
:usage
|
|
|
|
echo.
|
|
|
|
echo Usage:
|
2020-11-25 14:27:52 +01:00
|
|
|
echo make.bat [target] [compiler] [options]
|
2020-11-21 12:02:03 +01:00
|
|
|
echo.
|
2020-11-25 14:27:52 +01:00
|
|
|
echo Compiler:
|
2020-11-21 12:02:03 +01:00
|
|
|
echo -msvc ^| -gcc ^| -[fresh-]tcc ^| -clang Set C compiler
|
|
|
|
echo.
|
2020-11-25 14:27:52 +01:00
|
|
|
echo Target:
|
|
|
|
echo build[default] Compiles V using the given C compiler
|
|
|
|
echo clean Clean build artifacts and debugging symbols
|
|
|
|
echo clean-all Cleanup entire ALL build artifacts and vc repository
|
|
|
|
echo help Display usage help for the given target
|
2020-11-21 12:02:03 +01:00
|
|
|
echo.
|
|
|
|
echo Examples:
|
|
|
|
echo make.bat -msvc
|
|
|
|
echo make.bat -gcc --local --logpath output.log
|
2020-11-25 14:27:52 +01:00
|
|
|
echo make.bat build -fresh-tcc --local
|
|
|
|
echo make.bat help clean
|
|
|
|
echo.
|
|
|
|
echo Use "make help <target>" for more information about a target, for instance: "make help clean"
|
|
|
|
echo.
|
|
|
|
echo Note: Any undefined options will cause an error
|
|
|
|
exit /b 0
|
|
|
|
|
|
|
|
:help_help
|
|
|
|
echo Usage:
|
|
|
|
echo make.bat help [target]
|
2020-11-21 12:02:03 +01:00
|
|
|
echo.
|
2020-11-25 14:27:52 +01:00
|
|
|
echo Target:
|
|
|
|
echo build ^| clean ^| clean-all ^| help Query given target
|
2020-11-21 12:02:03 +01:00
|
|
|
exit /b 0
|
2020-11-25 14:27:52 +01:00
|
|
|
|
|
|
|
:help_clean
|
|
|
|
echo Usage:
|
|
|
|
echo make.bat clean
|
|
|
|
echo.
|
|
|
|
echo Options:
|
|
|
|
echo --logfile PATH Use the specified PATH as the log
|
|
|
|
echo -v ^| --verbose Output compilation commands to stdout
|
|
|
|
exit /b 0
|
|
|
|
|
|
|
|
:help_cleanall
|
|
|
|
echo Usage:
|
|
|
|
echo make.bat clean-all
|
|
|
|
echo.
|
|
|
|
echo Options:
|
|
|
|
echo --logfile PATH Use the specified PATH as the log
|
|
|
|
echo -v ^| --verbose Output compilation commands to stdout
|
|
|
|
exit /b 0
|
|
|
|
|
|
|
|
:help_build
|
|
|
|
echo Usage:
|
|
|
|
echo make.bat build [compiler] [options]
|
|
|
|
echo.
|
|
|
|
echo Compiler:
|
|
|
|
echo -msvc ^| -gcc ^| -[fresh-]tcc ^| -clang Set C compiler
|
|
|
|
echo.
|
|
|
|
echo Options:
|
|
|
|
echo --local Use the local vc repository without
|
|
|
|
echo syncing with remote
|
|
|
|
echo --logfile PATH Use the specified PATH as the log
|
|
|
|
echo file
|
|
|
|
echo -v ^| --verbose Output compilation commands to stdout
|
|
|
|
exit /b 0
|
|
|
|
|
|
|
|
:eof
|
|
|
|
popd
|
|
|
|
endlocal
|
|
|
|
exit /b 0
|