From 41d76b7083e278eb00f6c79b024a4f26d031ebfa Mon Sep 17 00:00:00 2001
From: Mike Sarahan <msarahan@gmail.com>
Date: Wed, 15 Jan 2020 09:17:43 -0600
Subject: [PATCH 1/4] scintilla makefiles

---
 Pythonwin/Scintilla/makefile_pythonwin      | 8 ++++----
 Pythonwin/Scintilla/win32/scintilla.mak     | 2 +-
 Pythonwin/Scintilla/win32/scintilla_vc6.mak | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Pythonwin/Scintilla/makefile_pythonwin b/Pythonwin/Scintilla/makefile_pythonwin
index 46c446f..ae8f15b 100644
--- a/Pythonwin/Scintilla/makefile_pythonwin
+++ b/Pythonwin/Scintilla/makefile_pythonwin
@@ -4,7 +4,7 @@
 # (but with special macros) and generates the .py
 # from the .h's
 
-!IFDEF DEBUG
+!IF "$(DEBUG)"=="1"
 DIR_O = ..\Build\Temp\Scintilla\Debug
 !ELSE
 DIR_O = ..\Build\Temp\Scintilla\Release
@@ -22,7 +22,7 @@ SUB_DIR_BIN = ..\$(DIR_BIN)
 SUB_DIR_O=..\$(DIR_O)
 !endif
 
-!IFDEF DEBUG
+!IF "$(DEBUG)"=="1"
 SCINTILLA_DLL = $(SUB_DIR_BIN)\Scintilla_d.dll
 !ELSE
 SCINTILLA_DLL = $(SUB_DIR_BIN)\Scintilla.dll
@@ -44,8 +44,8 @@ Scintilla:
 
 ..\pywin\scintilla\scintillacon.py: Include\Scintilla.h Include\SciLexer.h
 	@if not exist $(DIR_PYTHON)\tools\scripts\h2py.py echo ***** Can't find h2py.py in '$(DIR_PYTHON)\tools\scripts - please pass DIR_PYTHON to this script *******
-	$(DIR_PYTHON)\tools\scripts\h2py.py Include\scintilla.h
-	$(DIR_PYTHON)\tools\scripts\h2py.py Include\scilexer.h
+	$(PYTHON) $(DIR_PYTHON)\tools\scripts\h2py.py Include\scintilla.h
+	$(PYTHON) $(DIR_PYTHON)\tools\scripts\h2py.py Include\scilexer.h
     type scintilla.py > ..\pywin\scintilla\scintillacon.py
 	type scilexer.py >> ..\pywin\scintilla\scintillacon.py
 	del scintilla.py scilexer.py
diff --git a/Pythonwin/Scintilla/win32/scintilla.mak b/Pythonwin/Scintilla/win32/scintilla.mak
index 46c2aa0..21cb980 100644
--- a/Pythonwin/Scintilla/win32/scintilla.mak
+++ b/Pythonwin/Scintilla/win32/scintilla.mak
@@ -70,7 +70,7 @@ CXXFLAGS=$(CXXFLAGS) $(NOLOGO)
 LDFLAGS=$(LDFLAGS) $(NOLOGO)
 !ENDIF
 
-!IFDEF DEBUG
+!IF "$(DEBUG)"=="1"
 CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG)
 LDFLAGS=$(LDDEBUG) $(LDFLAGS)
 !ELSE
diff --git a/Pythonwin/Scintilla/win32/scintilla_vc6.mak b/Pythonwin/Scintilla/win32/scintilla_vc6.mak
index cccef49..3517cc0 100644
--- a/Pythonwin/Scintilla/win32/scintilla_vc6.mak
+++ b/Pythonwin/Scintilla/win32/scintilla_vc6.mak
@@ -72,7 +72,7 @@ CXXFLAGS=$(CXXFLAGS) $(NOLOGO)
 LDFLAGS=$(LDFLAGS) $(NOLOGO)
 !ENDIF
 
-!IFDEF DEBUG
+!IF "$(DEBUG)"=="1"
 CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG)
 LDFLAGS=$(LDDEBUG) $(LDFLAGS)
 !ELSE
-- 
2.20.1.windows.1

