summaryrefslogtreecommitdiff
path: root/MSVC/Tools/MakInDir.bat
diff options
context:
space:
mode:
Diffstat (limited to 'MSVC/Tools/MakInDir.bat')
-rw-r--r--MSVC/Tools/MakInDir.bat27
1 files changed, 27 insertions, 0 deletions
diff --git a/MSVC/Tools/MakInDir.bat b/MSVC/Tools/MakInDir.bat
new file mode 100644
index 0000000..6c28109
--- /dev/null
+++ b/MSVC/Tools/MakInDir.bat
@@ -0,0 +1,27 @@
+@echo off
+
+if "%2" == "" echo.
+if "%2" == "" echo USAGE: MakInDir [Directory] [Target]
+if "%2" == "" echo ------ Directory: directory to run NMAKE within
+if "%2" == "" echo ------ Target: the target of the NMAKE session
+if "%2" == "" goto done
+
+cd %1
+echo on
+nmake /f nmakefile /nologo %2
+@echo off
+if errorlevel 0 goto finish else goto bomb
+
+:bomb
+if "%OS%" == "" goto Win9xbomb else goto NTbomb
+
+:Win9xbomb
+exit
+
+:NTbomb
+exit 1
+
+:finish
+cd ..
+
+:done