From 226734c886e06adf1536bedabb4ba2b96e9381a5 Mon Sep 17 00:00:00 2001 From: Marek Paliwoda Date: Thu, 29 Nov 2007 21:08:41 +0000 Subject: [PATCH] 2007-11-29 22:10 UTC+0100 Marek Paliwoda (mpaliwoda at interia pl) * harbour/make_b32.bat * harbour/make_vc.bat * harbour/make_vcce.bat * Added handling of exit level in case of make error --- harbour/ChangeLog | 6 ++++++ harbour/make_b32.bat | 11 +++++++++-- harbour/make_vc.bat | 11 +++++++++-- harbour/make_vcce.bat | 11 +++++++++-- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c4a63ebf97..538c5693d3 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,12 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-11-29 22:10 UTC+0100 Marek Paliwoda (mpaliwoda at interia pl) + * harbour/make_b32.bat + * harbour/make_vc.bat + * harbour/make_vcce.bat + * Added handling of exit level in case of make error + 2007-11-29 21:40 UTC+0100 Marek Paliwoda (mpaliwoda at interia pl) * harbour/make_b32.bat * harbour/make_vc.bat diff --git a/harbour/make_b32.bat b/harbour/make_b32.bat index a02fb4a216..92d0fcdb7d 100644 --- a/harbour/make_b32.bat +++ b/harbour/make_b32.bat @@ -35,6 +35,8 @@ if "%HB_SHOW_ERRORS%" == "" set HB_SHOW_ERRORS=yes set HB_MAKEFILE=make_%HB_CC_NAME%.mak +set HB_EXIT_LEVEL= + rem --------------------------------------------------------------- rem Save the user value, force silent file overwrite with COPY @@ -54,12 +56,14 @@ if "%1" == "INSTALL" goto INSTALL :BUILD %HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% %1 %2 %3 > make_%HB_CC_NAME%.log + if errorlevel 1 set HB_EXIT_LEVEL=1 if errorlevel 1 if "%HB_SHOW_ERRORS%" == "yes" notepad make_%HB_CC_NAME%.log goto EXIT :CLEAN %HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% CLEAN > make_%HB_CC_NAME%.log + if errorlevel 1 set HB_EXIT_LEVEL=1 if errorlevel 1 goto EXIT if exist make_%HB_CC_NAME%.log del make_%HB_CC_NAME%.log > nul if exist inst_%HB_CC_NAME%.log del inst_%HB_CC_NAME%.log > nul @@ -68,12 +72,13 @@ if "%1" == "INSTALL" goto INSTALL :INSTALL %HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% INSTALL > nul + if errorlevel 1 set HB_EXIT_LEVEL=1 goto EXIT -:EXIT - rem --------------------------------------------------------------- +:EXIT + rem Restore user value set COPYCMD=%HB_ORGENV_COPYCMD% @@ -88,3 +93,5 @@ set HB_GT_LIB_SAV= set HB_CC_NAME_SAV= set HB_MAKE_PROGRAM_SAV= set HB_SHOW_ERRORS_SAV= + +if "%HB_EXIT_LEVEL%" == "1" exit 1 diff --git a/harbour/make_vc.bat b/harbour/make_vc.bat index 3c3ed3ecf2..62554c0234 100644 --- a/harbour/make_vc.bat +++ b/harbour/make_vc.bat @@ -35,6 +35,8 @@ if "%HB_SHOW_ERRORS%" == "" set HB_SHOW_ERRORS=yes set HB_MAKEFILE=make_%HB_CC_NAME%.mak +set HB_EXIT_LEVEL= + rem --------------------------------------------------------------- rem Save the user value, force silent file overwrite with COPY @@ -54,12 +56,14 @@ if "%1" == "INSTALL" goto INSTALL :BUILD %HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% %1 %2 %3 > make_%HB_CC_NAME%.log + if errorlevel 1 set HB_EXIT_LEVEL=1 if errorlevel 1 if "%HB_SHOW_ERRORS%" == "yes" notepad make_%HB_CC_NAME%.log goto EXIT :CLEAN %HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% CLEAN > make_%HB_CC_NAME%.log + if errorlevel 1 set HB_EXIT_LEVEL=1 if errorlevel 1 goto EXIT if exist make_%HB_CC_NAME%.log del make_%HB_CC_NAME%.log > nul if exist inst_%HB_CC_NAME%.log del inst_%HB_CC_NAME%.log > nul @@ -68,12 +72,13 @@ if "%1" == "INSTALL" goto INSTALL :INSTALL %HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% INSTALL > nul + if errorlevel 1 set HB_EXIT_LEVEL=1 goto EXIT -:EXIT - rem --------------------------------------------------------------- +:EXIT + rem Restore user value set COPYCMD=%HB_ORGENV_COPYCMD% @@ -88,3 +93,5 @@ set HB_GT_LIB_SAV= set HB_CC_NAME_SAV= set HB_MAKE_PROGRAM_SAV= set HB_SHOW_ERRORS_SAV= + +if "%HB_EXIT_LEVEL%" == "1" exit 1 diff --git a/harbour/make_vcce.bat b/harbour/make_vcce.bat index edfbe38cd0..aac6ab2979 100644 --- a/harbour/make_vcce.bat +++ b/harbour/make_vcce.bat @@ -40,6 +40,8 @@ set HB_MAKEFILE=make_%HB_CC_NAME%.mak set CFLAGS=%C_USR% -DHB_NO_WIN_CONSOLE +set HB_EXIT_LEVEL= + rem --------------------------------------------------------------- rem Save the user value, force silent file overwrite with COPY @@ -59,12 +61,14 @@ if "%1" == "INSTALL" goto INSTALL :BUILD %HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% %1 %2 %3 > make_%HB_CC_NAME%.log + if errorlevel 1 set HB_EXIT_LEVEL=1 if errorlevel 1 if "%HB_SHOW_ERRORS%" == "yes" notepad make_%HB_CC_NAME%.log goto EXIT :CLEAN %HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% CLEAN > make_%HB_CC_NAME%.log + if errorlevel 1 set HB_EXIT_LEVEL=1 if errorlevel 1 goto EXIT if exist make_%HB_CC_NAME%.log del make_%HB_CC_NAME%.log > nul if exist inst_%HB_CC_NAME%.log del inst_%HB_CC_NAME%.log > nul @@ -73,12 +77,13 @@ if "%1" == "INSTALL" goto INSTALL :INSTALL %HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% INSTALL > nul + if errorlevel 1 set HB_EXIT_LEVEL=1 goto EXIT -:EXIT - rem --------------------------------------------------------------- +:EXIT + rem Restore user value set COPYCMD=%HB_ORGENV_COPYCMD% @@ -97,3 +102,5 @@ set HB_MAKE_PROGRAM_SAV= set HB_SHOW_ERRORS_SAV= set HB_GT_DEFAULT_SAV= set C_USR_SAV= + +if "%HB_EXIT_LEVEL%" == "1" exit 1