Index: /main/trunk/greenstone2/common-src/src/lib/win32.mak
===================================================================
--- /main/trunk/greenstone2/common-src/src/lib/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/common-src/src/lib/win32.mak	(revision 21435)
@@ -68,12 +68,12 @@
 !ENDIF
 
-!IF "$(USE_SQLITE)" == "0"
+!IF $(USE_SQLITE)
+SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
+SQLITE_OBJECTS = sqlitedbclass.obj
+SQLITE_SOURCES = sqlitedbclass.cpp
+!ELSE
 SQLITE_INCLUDES = 
 SQLITE_OBJECTS = 
 SQLITE_SOURCES = 
-!ELSE
-SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
-SQLITE_OBJECTS = sqlitedbclass.obj
-SQLITE_SOURCES = sqlitedbclass.cpp
 !ENDIF
 
Index: /main/trunk/greenstone2/common-src/win32.mak
===================================================================
--- /main/trunk/greenstone2/common-src/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/common-src/win32.mak	(revision 21435)
@@ -37,4 +37,10 @@
 USE_SQLITE = 1
 USE_MSSQL = 0
+# by default, all indexers are enabled
+ENABLE_MG = 1
+ENABLE_MGPP = 1
+ENABLE_LUCENE = 1
+# jni is disabled by default as this is the default for GS2. GS3 will set this explicitly
+ENABLE_JNI = 0
 
 MDEFINES = /f win32.mak
@@ -55,15 +61,4 @@
 SQLITE_DIR = packages\sqlite\sqlite-amalgamation-3.5.9
 
-# indexers requires the ENABLE_indexer flags to be either 1 or 0,
-# so we ensure this is the case here
-!IF "$(ENABLE_MG)" != "0"
-ENABLE_MG = 1
-!ENDIF
-!IF "$(ENABLE_MGPP)" != "0"
-ENABLE_MGPP = 1
-!ENDIF
-!IF "$(ENABLE_LUCENE)" != "0"
-ENABLE_LUCENE = 1
-!ENDIF
 
 MAKECMD = $(MAKE) $(MDEFINES) GSDLHOME="$(GSDLHOME)" BINDIR="$(GSDLHOME)\bin\windows"
@@ -81,9 +76,8 @@
 MAKECMD = $(MAKECMD) DLLDEBUG=1
 !ENDIF
-!IF "$(USE_SQLITE)" == "0"
+!IF $(USE_SQLITE)
+PACKAGEDIRS = $(PACKAGEDIRS) $(SQLITE_DIR)
+!ELSE
 MAKECMD = $(MAKECMD) USE_SQLITE=0
-!ELSE
-MAKECMD = $(MAKECMD) USE_SQLITE=1
-PACKAGEDIRS = $(PACKAGEDIRS) $(SQLITE_DIR)
 !ENDIF
 !IF $(USE_MSSQL)
@@ -192,5 +186,5 @@
 	set ENABLE_LUCENE=$(ENABLE_LUCENE)
 
-!IF "$(ENABLE_JNI)" == "1"
+!IF $(ENABLE_JNI)
 	call winMake.bat all with-jni
 	call winMake.bat install with-jni
Index: /main/trunk/greenstone2/runtime-src/src/colservr/win32.mak
===================================================================
--- /main/trunk/greenstone2/runtime-src/src/colservr/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/runtime-src/src/colservr/win32.mak	(revision 21435)
@@ -64,10 +64,10 @@
 !ENDIF
 
-!IF "$(USE_SQLITE)" == "0"
+!IF $(USE_SQLITE)
+SQLITE_DEFINES = -DUSE_SQLITE
+SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
+!ELSE
 SQLITE_DEFINES = 
 SQLITE_INCLUDES = 
-!ELSE
-SQLITE_DEFINES = -DUSE_SQLITE
-SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
 !ENDIF
 
@@ -78,10 +78,5 @@
 !ENDIF
 
-!IF "$(ENABLE_MG)" == "0"
-MG_DEFS =
-MG_SOURCES =
-MG_OBJECTS =
-MG_INCLUDES =
-!ELSE
+!IF $(ENABLE_MG)
 MG_DEFS = -DENABLE_MG
 MG_SOURCES = mgq.c \
@@ -96,12 +91,12 @@
 	mgsource.obj
 MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mg\src\text"
-!ENDIF
-
-!IF "$(ENABLE_MGPP)" == "0"
-MGPP_DEFS =
-MGPP_SOURCES =
-MGPP_OBJECTS =
-MGPP_INCLUDES =
-!ELSE
+!ELSE
+MG_DEFS =
+MG_SOURCES =
+MG_OBJECTS =
+MG_INCLUDES =
+!ENDIF
+
+!IF $(ENABLE_MGPP)
 MGPP_DEFS = -DENABLE_MGPP
 MGPP_SOURCES = mgppqueryfilter.cpp \
@@ -112,4 +107,9 @@
 	mgppsource.obj
 MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\lib" -I"$(INDEXERS_DIR)\mgpp\text"
+!ELSE
+MGPP_DEFS =
+MGPP_SOURCES =
+MGPP_OBJECTS =
+MGPP_INCLUDES =
 !ENDIF
 
Index: /main/trunk/greenstone2/runtime-src/src/oaiservr/win32.mak
===================================================================
--- /main/trunk/greenstone2/runtime-src/src/oaiservr/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/runtime-src/src/oaiservr/win32.mak	(revision 21435)
@@ -74,26 +74,25 @@
 !ENDIF
 
-!IF "$(USE_SQLITE)" == "0"
+!IF $(USE_SQLITE)
+SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
+!ELSE
 SQLITE_LIBS = 
-!ELSE
-SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
-!ENDIF
-
-!IF "$(ENABLE_MG)" == "0"
-MG_LIBS =
-!ELSE
+!ENDIF
+
+!IF $(ENABLE_MG)
 MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
 	"$(INDEXERS_DIR)\mg\lib\libmglib.lib"	
-!ENDIF
-
-!IF "$(ENABLE_MGPP)" == "0"
-MGPP_LIBS =
-MGPP_INCLUDES =
-!ELSE
+!ELSE
+MG_LIBS =
+!ENDIF
+
+!IF $(ENABLE_MGPP)
 MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
 	"$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
 MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
-!ENDIF
-
+!ELSE
+MGPP_LIBS =
+MGPP_INCLUDES =
+!ENDIF
 
 
Index: /main/trunk/greenstone2/runtime-src/src/protocol/win32.mak
===================================================================
--- /main/trunk/greenstone2/runtime-src/src/protocol/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/runtime-src/src/protocol/win32.mak	(revision 21435)
@@ -60,8 +60,8 @@
 !ENDIF
 
-!IF "$(ENABLE_MGPP)" == "0"
+!IF $(ENABLE_MGPP)
+MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
+!ELSE
 MGPP_INCLUDES =
-!ELSE
-MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
 !ENDIF
 
Index: /main/trunk/greenstone2/runtime-src/src/recpt/win32.mak
===================================================================
--- /main/trunk/greenstone2/runtime-src/src/recpt/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/runtime-src/src/recpt/win32.mak	(revision 21435)
@@ -75,8 +75,8 @@
 !ENDIF
 
-!IF "$(USE_SQLITE)" == "0"
+!IF $(USE_SQLITE)
+SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
+!ELSE
 SQLITE_LIBS = 
-!ELSE
-SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
 !ENDIF
 
@@ -91,22 +91,16 @@
 !ENDIF
 
-!IF "$(ENABLE_MG)" == "0"
-MG_DEFS =
-MG_LIBS =
-MG_INCLUDES =
-!ELSE
+!IF $(ENABLE_MG)
 MG_DEFS = -DENABLE_MG
 MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
 	"$(INDEXERS_DIR)\mg\lib\libmglib.lib"
 MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" 
-!ENDIF
-
-!IF "$(ENABLE_MGPP)" == "0"
-MGPP_DEFS =
-MGPP_SOURCES = 
-MGPP_OBJECTS = 
-MGPP_LIBS =
-MGPP_INCLUDES =
-!ELSE
+!ELSE
+MG_DEFS =
+MG_LIBS =
+MG_INCLUDES =
+!ENDIF
+
+!IF $(ENABLE_MGPP)
 MGPP_DEFS = -DENABLE_MGPP
 MGPP_SOURCES = phindaction.cpp
@@ -116,4 +110,10 @@
 MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text" \
 	-I"$(INDEXERS_DIR)\mgpp\lib"
+!ELSE
+MGPP_DEFS =
+MGPP_SOURCES = 
+MGPP_OBJECTS = 
+MGPP_LIBS =
+MGPP_INCLUDES =
 !ENDIF
 
Index: /main/trunk/greenstone2/runtime-src/src/w32server/win32.mak
===================================================================
--- /main/trunk/greenstone2/runtime-src/src/w32server/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/runtime-src/src/w32server/win32.mak	(revision 21435)
@@ -66,28 +66,28 @@
 !ENDIF
 
-!IF "$(USE_SQLITE)" == "0"
+!IF $(USE_SQLITE)
+SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
+!ELSE
 SQLITE_LIBS = 
-!ELSE
-SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
-!ENDIF
-
-!IF "$(ENABLE_MG)" == "0"
-MG_LIBS =
-MG_INCLUDES =
-!ELSE
+!ENDIF
+
+!IF $(ENABLE_MG)
 MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
 	"$(INDEXERS_DIR)\mg\lib\libmglib.lib"
 MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mg\src\text"
-!ENDIF
-
-!IF "$(ENABLE_MGPP)" == "0"
-MGPP_DEFS =
-MGPP_LIBS =
-MGPP_INCLUDES =
-!ELSE
+!ELSE
+MG_LIBS =
+MG_INCLUDES =
+!ENDIF
+
+!IF $(ENABLE_MGPP)
 MGPP_DEFS = -DENABLE_MGPP
 MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
 	"$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
 MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\lib" -I"$(INDEXERS_DIR)\mgpp\text"
+!ELSE
+MGPP_DEFS =
+MGPP_LIBS =
+MGPP_INCLUDES =
 !ENDIF
 
Index: /main/trunk/greenstone2/runtime-src/src/z3950/win32.mak
===================================================================
--- /main/trunk/greenstone2/runtime-src/src/z3950/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/runtime-src/src/z3950/win32.mak	(revision 21435)
@@ -72,24 +72,24 @@
 !ENDIF
 
-!IF "$(USE_SQLITE)" == "0"
+!IF $(USE_SQLITE)
+SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
+!ELSE
 SQLITE_LIBS = 
-!ELSE
-SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
 !ENDIF
 
-!IF "$(ENABLE_MG)" == "0"
-MG_LIBS =
-!ELSE
+!IF $(ENABLE_MG)
 MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
 	"$(INDEXERS_DIR)\mg\lib\libmglib.lib"
+!ELSE
+MG_LIBS =
 !ENDIF
 
-!IF "$(ENABLE_MGPP)" == "0"
-MGPP_LIBS =
-MGPP_INCLUDES =
-!ELSE
+!IF $(ENABLE_MGPP)
 MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
 	"$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
 MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
+!ELSE
+MGPP_LIBS =
+MGPP_INCLUDES =
 !ENDIF
 
Index: /main/trunk/greenstone2/runtime-src/win32.mak
===================================================================
--- /main/trunk/greenstone2/runtime-src/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/runtime-src/win32.mak	(revision 21435)
@@ -72,8 +72,6 @@
 MAKECMD = $(MAKECMD) DLLDEBUG=1
 !ENDIF
-!IF "$(USE_SQLITE)" == ""
-MAKECMD = $(MAKECMD) USE_SQLITE=1
-!ELSE
-MAKECMD = $(MAKECMD) USE_SQLITE=$(USE_SQLITE)
+!IF !$(USE_SQLITE)
+MAKECMD = $(MAKECMD) USE_SQLITE=0
 !ENDIF
 !IF $(USE_MSSQL)
@@ -85,18 +83,12 @@
 PACKAGEDIRS = $(PACKAGEDIRS) packages\d2m $(YAZ_DIR)
 !ENDIF
-!IF "$(ENABLE_MG)" == ""
-MAKECMD = $(MAKECMD) ENABLE_MG=1
-!ELSE
-MAKECMD = $(MAKECMD) ENABLE_MG=$(ENABLE_MG)
+!IF !$(ENABLE_MG)
+MAKECMD = $(MAKECMD) ENABLE_MG=0
 !ENDIF
-!IF "$(ENABLE_MGPP)" == ""
-MAKECMD = $(MAKECMD) ENABLE_MGPP=1
-!ELSE
-MAKECMD = $(MAKECMD) ENABLE_MGPP=$(ENABLE_MGPP)
+!IF !$(ENABLE_MGPP)
+MAKECMD = $(MAKECMD) ENABLE_MGPP=0
 !ENDIF
-!IF "$(ENABLE_LUCENE)" == ""
-MAKECMD = $(MAKECMD) ENABLE_LUCENE=1
-!ELSE
-MAKECMD = $(MAKECMD) ENABLE_LUCENE=$(ENABLE_LUCENE)
+!IF !$(ENABLE_LUCENE)
+MAKECMD = $(MAKECMD) ENABLE_LUCENE=0
 !ENDIF
 
Index: /main/trunk/greenstone2/win32.mak
===================================================================
--- /main/trunk/greenstone2/win32.mak	(revision 21434)
+++ /main/trunk/greenstone2/win32.mak	(revision 21435)
@@ -38,5 +38,4 @@
 USE_MSSQL = 0
 USE_Z3950 = 0
-
 # by default, all indexers are enabled
 ENABLE_MG = 1
@@ -75,8 +74,6 @@
 MAKECMD = $(MAKECMD) DLLDEBUG=1
 !ENDIF
-!IF "$(USE_SQLITE)" == ""
-MAKECMD = $(MAKECMD) USE_SQLITE=1
-!ELSE
-MAKECMD = $(MAKECMD) USE_SQLITE=$(USE_SQLITE)
+!IF !$(USE_SQLITE)
+MAKECMD = $(MAKECMD) USE_SQLITE=0
 !ENDIF
 !IF $(USE_MSSQL)
@@ -86,23 +83,15 @@
 MAKECMD = $(MAKECMD) USE_Z3950=1
 !ENDIF
-!IF "$(ENABLE_JNI)" == ""
-MAKECMD = $(MAKECMD) ENABLE_JNI=0
-!ELSE
-MAKECMD = $(MAKECMD) ENABLE_JNI=$(ENABLE_JNI)
+!IF $(ENABLE_JNI)
+MAKECMD = $(MAKECMD) ENABLE_JNI=1
 !ENDIF
-!IF "$(ENABLE_MG)" == ""
-MAKECMD = $(MAKECMD) ENABLE_MG=1
-!ELSE
-MAKECMD = $(MAKECMD) ENABLE_MG=$(ENABLE_MG)
+!IF !$(ENABLE_MG)
+MAKECMD = $(MAKECMD) ENABLE_MG=0
 !ENDIF
-!IF "$(ENABLE_MGPP)" == ""
-MAKECMD = $(MAKECMD) ENABLE_MGPP=1
-!ELSE
-MAKECMD = $(MAKECMD) ENABLE_MGPP=$(ENABLE_MGPP)
+!IF !$(ENABLE_MGPP)
+MAKECMD = $(MAKECMD) ENABLE_MGPP=0
 !ENDIF
-!IF "$(ENABLE_LUCENE)" == ""
-MAKECMD = $(MAKECMD) ENABLE_LUCENE=1
-!ELSE
-MAKECMD = $(MAKECMD) ENABLE_LUCENE=$(ENABLE_LUCENE)
+!IF !$(ENABLE_LUCENE)
+MAKECMD = $(MAKECMD) ENABLE_LUCENE=0
 !ENDIF
 
