File: make.bat

package info (click to toggle)
watchman 4.9.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,992 kB
  • sloc: cpp: 27,459; python: 6,538; java: 3,404; php: 3,257; ansic: 2,803; javascript: 1,116; makefile: 671; ruby: 364; sh: 124; xml: 102; lisp: 4
file content (41 lines) | stat: -rw-r--r-- 1,260 bytes parent folder | download | duplicates (3)
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
set need_setup=0

@rem if we don't have nmake in the path, we need to run setup
where nmake.exe 2> NUL
if %ERRORLEVEL% GTR 0 set need_setup=1

@rem if we don't have the include path set, we need to run setup
if not defined INCLUDE set need_setup=1

@rem backup of the path, otherwise we end up with an "input line is too long"
@rem error since the path env var is growing up at every call to vsvarsall.bat
@set PATH_BACKUP=%PATH%

@rem run setup if we need to
if %need_setup% == 1 call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64

@rem Allow python build to succeed:
@rem http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat
SET VS90COMNTOOLS=%VS140COMNTOOLS%

where python.exe 2> NUL
if %ERRORLEVEL% GTR 0 set PATH=c:\Python27;%PATH%

where php.exe 2> NUL
if %ERRORLEVEL% GTR 0 set PATH=c:\php;%PATH%

@rem finally, run make
nmake /nologo /s /f winbuild\Makefile %1 %2 %3 %4

SET RETURN_CODE=%ERRORLEVEL%

@rem restore the original path value
@set PATH=%PATH_BACKUP%

@rem "input line is too long" problem occur also with the INCLUDE environment variable
@rem We just wipe it since next call to the batch file will set back the right value
@set INCLUDE=
@set LIB=
@set LIBPATH=

EXIT /B %RETURN_CODE%