Getting rid of CMake for internal build
[hiphop-php.git] / hphp / hack / make.bat
blob9ef0e6468b1496731f4cd13c624a69c55fb22fee
2 @echo off
4 if "%1" == "" goto build
5 if "%1" == "build" goto build
6 if "%1" == "all" goto build
7 if "%1" == "test" goto test
8 if "%1" == "init" goto init
9 if "%1" == "clean" goto clean
10 REM Invalid argument
11 echo Invalid argument, please check README.win32
12 goto end
14 REM initialize ocp-build and create _obuild directory
15 :init
16 if not exist "_obuild/" ocp-build init
17 goto end
19 REM 1/ check if ocp-build init has already be done
20 REM 2/ generate get_build_id_gen.c
21 REM 3/ start build hack with ocp-build
22 :build
23 if not exist "_obuild/" ocp-build init
24 ocaml.exe unix.cma ./scripts/gen_build_id.ml ./src/utils/get_build_id_gen.c
25 ocaml.exe unix.cma ./scripts/gen_index.ml hhi.rc hhi
26 ocp-build
27 md bin 2>NUL
28 copy _obuild\hh_server\hh_server.asm.exe bin\hh_server.exe
29 copy _obuild\hh_client\hh_client.asm.exe bin\hh_client.exe
30 copy _obuild\hh_single_type_check\hh_single_type_check.asm.exe bin\hh_single_type_check.exe
31 copy _obuild\hackfmt\hackfmt.asm.exe bin\hackfmt.exe
33 goto end
35 REM clean _obuild directory and executables in bin/
36 :clean
37 ocp-build clean
38 del bin\hh_server.exe 2>NUL
39 del bin\hh_client.exe 2>NUL
40 del bin\hh_single_type_check.exe 2>NUL
41 del bin\hackfmt.exe 2>NUL
42 goto end
44 REM execute the Hack testsuite
45 :test
46 @echo on
48 set "python3=python.exe"
49 set "max=8"
50 "%python3%" test\verify.py --max-workers "%max%" --program bin\hh_single_type_check.exe test\autocomplete
51 "%python3%" test\verify.py --max-workers "%max%" --program bin\hh_single_type_check.exe test\color
52 "%python3%" test\verify.py --max-workers "%max%" --program bin\hh_single_type_check.exe test\colour
53 "%python3%" test\verify.py --max-workers "%max%" --program bin\hh_single_type_check.exe test\coverage
54 "%python3%" test\verify.py --max-workers "%max%" --program bin\hh_single_type_check.exe test\dumpsymbolinfo
55 "%python3%" test\verify.py --max-workers "%max%" --program bin\hh_single_type_check.exe test\typecheck
56 :end