@echo off REM Windows version of the Unix Makefile REM Doesn't do any dependancy analysis if "%HC%" == "" set HC=ghc if x%VC% == x set VC="C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv" set exit=exit set opt= set mode= :get_args if "%1" == "" goto done_args set mode1=%mode% set opt1=%opt% set arg=%1 if "%1" == "all" set mode=all if "%1" == "runtime" set mode=runtime if "%1" == "compiler" set mode=compiler if "%1" == "test" set mode=test if "%1" == "interpreter" set mode=interpreter if "%1" == "yhi" set mode=runtime if "%1" == "yhc" set mode=compiler if "%1" == "yhci" set mode=interpreter if "%1" == "debug" set opt=debug if "%1" == "release" set opt=release shift if not "%opt%" == "%opt1%" goto get_args if not "%mode%" == "%mode1%" goto get_args echo Error: Argument not understood: %arg% goto exit :done_args if "%mode%" == "" goto print_help if "%mode%" == "all" goto make_all if "%mode%" == "runtime" goto make_runtime if "%mode%" == "compiler" goto make_compiler if "%mode%" == "interpreter" goto make_interpreter if "%mode%" == "test" goto make_test echo Error: Mode not known: %mode% goto exit :print_help echo Makefile options echo Mode: echo all - build runtime and compiler echo test - run the tests [does not do all first] echo yhi/runtime - build the runtime [TODO] echo yhc/compiler - build the compiler echo yhci/interpreter - build the interpreter echo Options: echo debug - compile the runtime in debug mode echo release - compile the runtime in release mode [default] goto exit :make_all set exit=make_all_1 goto make_compiler :make_all_1 set exit=make_all_2 goto make_interpreter :make_all_2 set exit=make_all_3 goto make_runtime :make_all_3 goto exit :make_test pushd tests python runtests.py -nocolor popd goto %exit% :make_compiler pushd "src\compiler98" ghc --make -cpp Main -o "..\..\inst\bin\yhc.exe" popd goto %exit% :make_interpreter pushd "src\interpreter" ghc --make -cpp Main -o "..\..\inst\bin\yhci.exe" popd goto %exit% :make_runtime if "%opt%" == "" set opt=release pushd "src\runtime\BCKernel\msvc" %VC% yhi.sln /build %opt% copy %opt%\yhi.exe "..\..\..\..\inst\bin\yhi.exe" popd goto %exit% :exit