diff options
author | Paul Smith <psmith@gnu.org> | 2019-08-25 17:11:10 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2019-08-26 07:54:09 -0400 |
commit | 2273ab7069b83669daeb4b36515631a73b80b5ee (patch) | |
tree | 3ece7a7a719018e789758b469fb3b60b50f26fd9 /build_w32.bat | |
parent | 2e388a18a196abef4e846517a686d436e614cd12 (diff) | |
download | make-git-2273ab7069b83669daeb4b36515631a73b80b5ee.tar.gz |
Update maintainer mode to support debug wait points.
Make a spin() method available when compiled in maintainer mode.
If a file exists in the working directory with a specific name,
make will sleep until the file is deleted.
Ensure that maintainer mode is enabled on Windows, using the same
algorithm we use on POSIX / autoconf systems.
* build_w32.bat: If maintMakefile exists, enable maintainer mode.
* src/main.c (main): Replace Windows-only suspend flag with spin().
* src/makeint.h: A SPIN() macro calls spin() in maintainer mode.
* src/misc.c (spin): If a spin file exists sleep until it's deleted.
Diffstat (limited to 'build_w32.bat')
-rwxr-xr-x | build_w32.bat | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/build_w32.bat b/build_w32.bat index abe66359..16aa9a44 100755 --- a/build_w32.bat +++ b/build_w32.bat @@ -38,6 +38,12 @@ set O=obj set ARCH=x64
set DEBUG=N
+if exist maintMakefile (
+ set MAINT=Y
+) else (
+ set MAINT=N
+)
+
:ParseSW
if "%1" == "--debug" goto SetDebug
if "%1" == "--without-guile" goto NoGuile
@@ -72,6 +78,8 @@ shift goto ParseSW
:DoneSW
+if "%MAINT%" == "Y" echo - Enabling maintainer mode
+
if "%COMPILER%" == "gcc" goto FindGcc
:: Find a compiler. Visual Studio requires a lot of effort to locate :-/.
@@ -151,6 +159,7 @@ set LINKOPTS= if "%DEBUG%" == "Y" set OUTDIR=.\WinDebug
if "%DEBUG%" == "Y" set "OPTS=/Zi /Od /D _DEBUG"
if "%DEBUG%" == "Y" set LINKOPTS=/DEBUG
+if "%MAINT%" == "Y" set "OPTS=%OPTS% /D MAKE_MAINTAINER_MODE"
:: Show the compiler version that we found
:: Unfortunately this also shows a "usage" note; I can't find anything better.
echo.
@@ -162,6 +171,7 @@ set OUTDIR=.\GccRel set OPTS=-O2
if "%DEBUG%" == "Y" set OPTS=-O0
if "%DEBUG%" == "Y" set OUTDIR=.\GccDebug
+if "%MAINT%" == "Y" set "OPTS=%OPTS% -DMAKE_MAINTAINER_MODE"
:: Show the compiler version that we found
echo.
%COMPILER% --version
|