File: bootstrap.bat

package info (click to toggle)
muon-meson 0.5.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,532 kB
  • sloc: ansic: 67,766; python: 4,391; cpp: 1,983; sh: 709; javascript: 570; asm: 226; xml: 67; objc: 36; makefile: 29; modula3: 8; f90: 7
file content (30 lines) | stat: -rw-r--r-- 740 bytes parent folder | download
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
:: SPDX-FileCopyrightText: Stone Tickle <lattis@mochiro.moe>
:: SPDX-License-Identifier: GPL-3.0-only

@echo off
setlocal
cd /D "%~dp0"

if "%~1" == "" goto :usage

where cl >nul 2>nul
if %ERRORLEVEL%==0 goto :build

if "%~2" == "" (set arch=amd64) else (set arch=%~2)

:: Attempt to run vcvarsall if cl was not found.
for /f "tokens=*" %%g in (
'"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath'
) do (set installation_path=%%g)
call "%installation_path%\VC\Auxiliary\Build\vcvarsall" %arch%

:build

set dir=%1
if not exist "%dir%" mkdir "%dir%"

call cl /nologo /Zi /std:c11 /Iinclude src/amalgam.c /link /out:"%dir%/muon-bootstrap.exe"
goto :eof

:usage
echo usage: %0 build_dir