3 REM ~ Copyright 2002-2017 Rene Rivera.
4 REM ~ Distributed under the Boost Software License, Version 1.0.
5 REM ~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7 if "_%1_" == "_yacc_" goto Guess_Yacc
17 REM Tests for the given executable file presence in the directories in the PATH
18 REM environment variable. Additionaly sets FOUND_PATH to the path of the
24 if not errorlevel 1 set FOUND_PATH
=%~dp$
PATH:1
29 REM Check the variable first. This can be set manually by the user (by running the tools commmand prompt).
31 call vswhere_usability_wrapper.
cmd
32 if NOT "_%VS150COMNTOOLS%_" == "__" (
33 set "BOOST_JAM_TOOLSET=vc141"
34 set "BOOST_JAM_TOOLSET_ROOT=%VS150COMNTOOLS%..\..\VC\"
39 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio
\2017\Enterprise\VC\Auxiliary\Build
\vcvarsall.bat
" (
40 set "BOOST_JAM_TOOLSET
=vc141
"
41 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio
\2017\Enterprise\VC
\"
43 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" (
44 set "BOOST_JAM_TOOLSET=vc141"
45 set "BOOST_JAM_TOOLSET_ROOT=%VS_ProgramFiles%\Microsoft Visual Studio\2017\Professional\VC\"
47 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio
\2017\Community\VC\Auxiliary\Build
\vcvarsall.bat
" (
48 set "BOOST_JAM_TOOLSET
=vc141
"
49 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio
\2017\Community\VC
\"
51 if NOT "_%VS140COMNTOOLS%_" == "__" (
52 set "BOOST_JAM_TOOLSET=vc14"
53 set "BOOST_JAM_TOOLSET_ROOT=%VS140COMNTOOLS%..\..\VC\"
55 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio
14.0\VC\VCVARSALL.BAT
" (
56 set "BOOST_JAM_TOOLSET
=vc14
"
57 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio
14.0\VC
\"
59 if NOT "_%VS120COMNTOOLS%_" == "__" (
60 set "BOOST_JAM_TOOLSET=vc12"
61 set "BOOST_JAM_TOOLSET_ROOT=%VS120COMNTOOLS%..\..\VC\"
63 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio
12.0\VC\VCVARSALL.BAT
" (
64 set "BOOST_JAM_TOOLSET
=vc12
"
65 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio
12.0\VC
\"
67 if NOT "_%VS110COMNTOOLS%_" == "__" (
68 set "BOOST_JAM_TOOLSET=vc11"
69 set "BOOST_JAM_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\"
71 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio
11.0\VC\VCVARSALL.BAT
" (
72 set "BOOST_JAM_TOOLSET
=vc11
"
73 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio
11.0\VC
\"
75 if NOT "_%VS100COMNTOOLS%_" == "__" (
76 set "BOOST_JAM_TOOLSET=vc10"
77 set "BOOST_JAM_TOOLSET_ROOT=%VS100COMNTOOLS%..\..\VC\"
79 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio
10.0\VC\VCVARSALL.BAT
" (
80 set "BOOST_JAM_TOOLSET
=vc10
"
81 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio
10.0\VC
\"
83 if NOT "_%VS90COMNTOOLS%_" == "__" (
84 set "BOOST_JAM_TOOLSET=vc9"
85 set "BOOST_JAM_TOOLSET_ROOT=%VS90COMNTOOLS%..\..\VC\"
87 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio
9.0\VC\VCVARSALL.BAT
" (
88 set "BOOST_JAM_TOOLSET
=vc9
"
89 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio
9.0\VC
\"
91 if NOT "_%VS80COMNTOOLS%_" == "__" (
92 set "BOOST_JAM_TOOLSET=vc8"
93 set "BOOST_JAM_TOOLSET_ROOT=%VS80COMNTOOLS%..\..\VC\"
95 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio
8\VC\VCVARSALL.BAT
" (
96 set "BOOST_JAM_TOOLSET
=vc8
"
97 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio
8\VC
\"
99 if NOT "_%VS71COMNTOOLS%_" == "__" (
100 set "BOOST_JAM_TOOLSET=vc7"
101 set "BOOST_JAM_TOOLSET_ROOT=%VS71COMNTOOLS%\..\..\VC7\"
103 if NOT "_
%VCINSTALLDIR%_
" == "__
" (
104 REM %VCINSTALLDIR% is also set for VC9 (and probably VC8)
105 set "BOOST_JAM_TOOLSET
=vc7
"
106 set "BOOST_JAM_TOOLSET_ROOT
=%VCINSTALLDIR%\VC7
\"
108 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\bin\VCVARS32.BAT" (
109 set "BOOST_JAM_TOOLSET=vc7"
110 set "BOOST_JAM_TOOLSET_ROOT=%VS_ProgramFiles%\Microsoft Visual Studio .NET 2003\VC7\"
112 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio .
NET\VC7
\bin\VCVARS32.BAT
" (
113 set "BOOST_JAM_TOOLSET
=vc7
"
114 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio .
NET\VC7
\"
116 if NOT "_%MSVCDir%_" == "__" (
117 set "BOOST_JAM_TOOLSET=msvc"
118 set "BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\"
120 if EXIST "%VS_ProgramFiles%\Microsoft Visual Studio\VC98
\bin\VCVARS32.BAT
" (
121 set "BOOST_JAM_TOOLSET
=msvc
"
122 set "BOOST_JAM_TOOLSET_ROOT
=%VS_ProgramFiles%\Microsoft Visual Studio\VC98
\"
124 if EXIST "%VS_ProgramFiles%\Microsoft Visual C++\VC98\bin\VCVARS32.BAT" (
125 set "BOOST_JAM_TOOLSET=msvc"
126 set "BOOST_JAM_TOOLSET_ROOT=%VS_ProgramFiles%\Microsoft Visual C++\VC98\"
128 call :Test_Path cl.exe
129 if not errorlevel 1 (
130 set "BOOST_JAM_TOOLSET
=msvc
"
131 set "BOOST_JAM_TOOLSET_ROOT
=%FOUND_PATH%..
\"
133 call :Test_Path vcvars32.bat
134 if not errorlevel 1 (
135 set "BOOST_JAM_TOOLSET=msvc"
136 call "%FOUND_PATH%VCVARS32.BAT"
137 set "BOOST_JAM_TOOLSET_ROOT=%MSVCDir%\"
139 if EXIST "C
:\Borland\BCC55\Bin
\bcc
32.exe
" (
140 set "BOOST_JAM_TOOLSET
=borland
"
141 set "BOOST_JAM_TOOLSET_ROOT
=C
:\Borland\BCC55
\"
143 call :Test_Path bcc32.exe
144 if not errorlevel 1 (
145 set "BOOST_JAM_TOOLSET=borland"
146 set "BOOST_JAM_TOOLSET_ROOT=%FOUND_PATH%..\"
148 call :Test_Path icl.exe
149 if not errorlevel 1 (
150 set "BOOST_JAM_TOOLSET
=intel
-win32
"
151 set "BOOST_JAM_TOOLSET_ROOT
=%FOUND_PATH%..
\"
153 if EXIST "C:\MinGW\bin\gcc.exe" (
154 set "BOOST_JAM_TOOLSET=mingw"
155 set "BOOST_JAM_TOOLSET_ROOT=C:\MinGW\"
157 if NOT "_
%CWFolder%_
" == "__
" (
158 set "BOOST_JAM_TOOLSET
=metrowerks
"
159 set "BOOST_JAM_TOOLSET_ROOT
=%CWFolder%\"
161 call :Test_Path mwcc.exe
162 if not errorlevel 1 (
163 set "BOOST_JAM_TOOLSET=metrowerks"
164 set "BOOST_JAM_TOOLSET_ROOT=%FOUND_PATH%..\..\"
166 REM Could not find a suitable toolset
171 REM Tries to find bison or yacc in common places so we can build the grammar.
172 call :Test_Path yacc.exe
173 if not errorlevel 1 (
176 call :Test_Path bison.exe
177 if not errorlevel 1 (
178 set "YACC
=bison
-d
--yacc
"
180 if EXIST "C
:\Program
Files\GnuWin32
\bin
\bison.exe
" (
181 set "YACC
=C
:\Program
Files\GnuWin32
\bin
\bison.exe
" -d --yacc