Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[build] Add top-level build.bat and clean.bat files
Why would anyone want to use Makefiles when the DDK makes it so easy
to write custom batch scripts to mimic such essential functionality?

("Mimic" is a very appropriate word; it seems as though the DDK's
"build" utility doesn't reflect build failures in its exit status, so
we have no way to detect build errors other than watching the
console!)
  • Loading branch information
mcb30 committed Dec 19, 2008
1 parent eb9dc7f commit 0de9382
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build.bat
@@ -0,0 +1,21 @@
@echo off

if "%ddkdir%" == "" set ddkdir=C:\WinDDK\6001.18001

for /f "delims=" %%i in ('cd') do set cwd=%%i

call :build driver chk w2k i386
call :build installer chk w2k i386
call :build driver chk wnet x64
call :build installer chk wnet x64

goto :end

:build
set subdir=%cwd%\%1
set ddkenv=%2 %3 %4
echo Building %subdir% for %ddkenv%
cmd /c "%ddkdir%\bin\setenv.bat %ddkdir% %ddkenv% && cd /d %subdir% && build /c" || exit /b 1
goto :end

:end
4 changes: 4 additions & 0 deletions clean.bat
@@ -0,0 +1,4 @@
@echo off

del /q bin\i386\*.*
del /q bin\amd64\*.*

0 comments on commit 0de9382

Please sign in to comment.