@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" == "tests" set mode=tests if "%1" == "interpreter" set mode=interpreter if "%1" == "docs" set mode=docs if "%1" == "yhi" set mode=runtime if "%1" == "yhc" set mode=compiler if "%1" == "yhe" set mode=interpreter if "%1" == "yht" set mode=test if "%1" == "debug" set opt=debug if "%1" == "release" set opt=release if "%1" == "nofib" set opt=nofib if "%1" == "conform" set opt=conformance98 if "%1" == "conformance98" set opt=conformance98 if "%1" == "98" set opt=conformance98 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 if "%mode%" == "tests" goto run_tests if "%mode%" == "docs" goto make_docs echo Error: Mode not known: %mode% goto exit :print_help echo Makefile options echo Mode: echo all - everything but tests echo tests - run the test suite [98 or nofib] echo docs - make haddock documentation echo yht/test - build the test suite echo yhi/runtime - build the runtime echo yhc/compiler - build the compiler echo yhe/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 set exit=make_all_4 goto make_test :make_all_4 goto exit :make_test pushd tests ghc --make -cpp Test -o "..\inst\bin\yht.exe" popd goto %exit% :run_tests pushd "inst\bin" if not "%opt%" == "" set opt=\%opt% yht.exe "..\..\tests%opt%" popd goto %exit% :make_compiler pushd "src\compiler98" ghc --make -cpp Main -o "..\..\inst\bin\yhc.exe" popd goto %exit% :make_docs pushd "src\compiler98" md "..\..\docs" haddock *.hs ByteCode\*.hs Derive\*.hs Parse\*.hs Type\*.hs Util\*.hs -h -o ..\..\docs popd goto %exit% :make_interpreter pushd "src\interpreter" ghc --make -cpp CmdLine -o "..\..\inst\bin\yhe.exe" ghc --make -cpp GuiGtk -o "..\..\inst\bin\yhe_gtk.exe" popd goto %exit% :make_runtime if not "%opt%" == "debug" 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