Changeset 21435


Ignore:
Timestamp:
01/07/10 14:23:27 (11 years ago)
Author:
ak19
Message:

Better way of setting the ENABLE_indexer and USE_SQLITE and ENABLE_JNI variables in the windows makefiles.

Location:
main/trunk/greenstone2
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/src/lib/win32.mak

    r21325 r21435  
    6868!ENDIF
    6969
    70 !IF "$(USE_SQLITE)" == "0"
     70!IF $(USE_SQLITE)
     71SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
     72SQLITE_OBJECTS = sqlitedbclass.obj
     73SQLITE_SOURCES = sqlitedbclass.cpp
     74!ELSE
    7175SQLITE_INCLUDES =
    7276SQLITE_OBJECTS =
    7377SQLITE_SOURCES =
    74 !ELSE
    75 SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
    76 SQLITE_OBJECTS = sqlitedbclass.obj
    77 SQLITE_SOURCES = sqlitedbclass.cpp
    7878!ENDIF
    7979
  • main/trunk/greenstone2/common-src/win32.mak

    r21365 r21435  
    3737USE_SQLITE = 1
    3838USE_MSSQL = 0
     39# by default, all indexers are enabled
     40ENABLE_MG = 1
     41ENABLE_MGPP = 1
     42ENABLE_LUCENE = 1
     43# jni is disabled by default as this is the default for GS2. GS3 will set this explicitly
     44ENABLE_JNI = 0
    3945
    4046MDEFINES = /f win32.mak
     
    5561SQLITE_DIR = packages\sqlite\sqlite-amalgamation-3.5.9
    5662
    57 # indexers requires the ENABLE_indexer flags to be either 1 or 0,
    58 # so we ensure this is the case here
    59 !IF "$(ENABLE_MG)" != "0"
    60 ENABLE_MG = 1
    61 !ENDIF
    62 !IF "$(ENABLE_MGPP)" != "0"
    63 ENABLE_MGPP = 1
    64 !ENDIF
    65 !IF "$(ENABLE_LUCENE)" != "0"
    66 ENABLE_LUCENE = 1
    67 !ENDIF
    6863
    6964MAKECMD = $(MAKE) $(MDEFINES) GSDLHOME="$(GSDLHOME)" BINDIR="$(GSDLHOME)\bin\windows"
     
    8176MAKECMD = $(MAKECMD) DLLDEBUG=1
    8277!ENDIF
    83 !IF "$(USE_SQLITE)" == "0"
     78!IF $(USE_SQLITE)
     79PACKAGEDIRS = $(PACKAGEDIRS) $(SQLITE_DIR)
     80!ELSE
    8481MAKECMD = $(MAKECMD) USE_SQLITE=0
    85 !ELSE
    86 MAKECMD = $(MAKECMD) USE_SQLITE=1
    87 PACKAGEDIRS = $(PACKAGEDIRS) $(SQLITE_DIR)
    8882!ENDIF
    8983!IF $(USE_MSSQL)
     
    192186    set ENABLE_LUCENE=$(ENABLE_LUCENE)
    193187
    194 !IF "$(ENABLE_JNI)" == "1"
     188!IF $(ENABLE_JNI)
    195189    call winMake.bat all with-jni
    196190    call winMake.bat install with-jni
  • main/trunk/greenstone2/runtime-src/src/colservr/win32.mak

    r21324 r21435  
    6464!ENDIF
    6565
    66 !IF "$(USE_SQLITE)" == "0"
     66!IF $(USE_SQLITE)
     67SQLITE_DEFINES = -DUSE_SQLITE
     68SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
     69!ELSE
    6770SQLITE_DEFINES =
    6871SQLITE_INCLUDES =
    69 !ELSE
    70 SQLITE_DEFINES = -DUSE_SQLITE
    71 SQLITE_INCLUDES = -I"$(COMMON_PACKAGES_DIR)\sqlite\include"
    7272!ENDIF
    7373
     
    7878!ENDIF
    7979
    80 !IF "$(ENABLE_MG)" == "0"
    81 MG_DEFS =
    82 MG_SOURCES =
    83 MG_OBJECTS =
    84 MG_INCLUDES =
    85 !ELSE
     80!IF $(ENABLE_MG)
    8681MG_DEFS = -DENABLE_MG
    8782MG_SOURCES = mgq.c \
     
    9691    mgsource.obj
    9792MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mg\src\text"
    98 !ENDIF
    99 
    100 !IF "$(ENABLE_MGPP)" == "0"
    101 MGPP_DEFS =
    102 MGPP_SOURCES =
    103 MGPP_OBJECTS =
    104 MGPP_INCLUDES =
    105 !ELSE
     93!ELSE
     94MG_DEFS =
     95MG_SOURCES =
     96MG_OBJECTS =
     97MG_INCLUDES =
     98!ENDIF
     99
     100!IF $(ENABLE_MGPP)
    106101MGPP_DEFS = -DENABLE_MGPP
    107102MGPP_SOURCES = mgppqueryfilter.cpp \
     
    112107    mgppsource.obj
    113108MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\lib" -I"$(INDEXERS_DIR)\mgpp\text"
     109!ELSE
     110MGPP_DEFS =
     111MGPP_SOURCES =
     112MGPP_OBJECTS =
     113MGPP_INCLUDES =
    114114!ENDIF
    115115
  • main/trunk/greenstone2/runtime-src/src/oaiservr/win32.mak

    r21324 r21435  
    7474!ENDIF
    7575
    76 !IF "$(USE_SQLITE)" == "0"
     76!IF $(USE_SQLITE)
     77SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
     78!ELSE
    7779SQLITE_LIBS =
    78 !ELSE
    79 SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
    80 !ENDIF
    81 
    82 !IF "$(ENABLE_MG)" == "0"
    83 MG_LIBS =
    84 !ELSE
     80!ENDIF
     81
     82!IF $(ENABLE_MG)
    8583MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
    8684    "$(INDEXERS_DIR)\mg\lib\libmglib.lib"   
    87 !ENDIF
    88 
    89 !IF "$(ENABLE_MGPP)" == "0"
    90 MGPP_LIBS =
    91 MGPP_INCLUDES =
    92 !ELSE
     85!ELSE
     86MG_LIBS =
     87!ENDIF
     88
     89!IF $(ENABLE_MGPP)
    9390MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
    9491    "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
    9592MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
    96 !ENDIF
    97 
     93!ELSE
     94MGPP_LIBS =
     95MGPP_INCLUDES =
     96!ENDIF
    9897
    9998
  • main/trunk/greenstone2/runtime-src/src/protocol/win32.mak

    r21332 r21435  
    6060!ENDIF
    6161
    62 !IF "$(ENABLE_MGPP)" == "0"
     62!IF $(ENABLE_MGPP)
     63MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
     64!ELSE
    6365MGPP_INCLUDES =
    64 !ELSE
    65 MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
    6666!ENDIF
    6767
  • main/trunk/greenstone2/runtime-src/src/recpt/win32.mak

    r21336 r21435  
    7575!ENDIF
    7676
    77 !IF "$(USE_SQLITE)" == "0"
     77!IF $(USE_SQLITE)
     78SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
     79!ELSE
    7880SQLITE_LIBS =
    79 !ELSE
    80 SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
    8181!ENDIF
    8282
     
    9191!ENDIF
    9292
    93 !IF "$(ENABLE_MG)" == "0"
    94 MG_DEFS =
    95 MG_LIBS =
    96 MG_INCLUDES =
    97 !ELSE
     93!IF $(ENABLE_MG)
    9894MG_DEFS = -DENABLE_MG
    9995MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
    10096    "$(INDEXERS_DIR)\mg\lib\libmglib.lib"
    10197MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib"
    102 !ENDIF
    103 
    104 !IF "$(ENABLE_MGPP)" == "0"
    105 MGPP_DEFS =
    106 MGPP_SOURCES =
    107 MGPP_OBJECTS =
    108 MGPP_LIBS =
    109 MGPP_INCLUDES =
    110 !ELSE
     98!ELSE
     99MG_DEFS =
     100MG_LIBS =
     101MG_INCLUDES =
     102!ENDIF
     103
     104!IF $(ENABLE_MGPP)
    111105MGPP_DEFS = -DENABLE_MGPP
    112106MGPP_SOURCES = phindaction.cpp
     
    116110MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text" \
    117111    -I"$(INDEXERS_DIR)\mgpp\lib"
     112!ELSE
     113MGPP_DEFS =
     114MGPP_SOURCES =
     115MGPP_OBJECTS =
     116MGPP_LIBS =
     117MGPP_INCLUDES =
    118118!ENDIF
    119119
  • main/trunk/greenstone2/runtime-src/src/w32server/win32.mak

    r21324 r21435  
    6666!ENDIF
    6767
    68 !IF "$(USE_SQLITE)" == "0"
     68!IF $(USE_SQLITE)
     69SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
     70!ELSE
    6971SQLITE_LIBS =
    70 !ELSE
    71 SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
    72 !ENDIF
    73 
    74 !IF "$(ENABLE_MG)" == "0"
    75 MG_LIBS =
    76 MG_INCLUDES =
    77 !ELSE
     72!ENDIF
     73
     74!IF $(ENABLE_MG)
    7875MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
    7976    "$(INDEXERS_DIR)\mg\lib\libmglib.lib"
    8077MG_INCLUDES = -I"$(INDEXERS_DIR)\mg" -I"$(INDEXERS_DIR)\mg\lib" -I"$(INDEXERS_DIR)\mg\src\text"
    81 !ENDIF
    82 
    83 !IF "$(ENABLE_MGPP)" == "0"
    84 MGPP_DEFS =
    85 MGPP_LIBS =
    86 MGPP_INCLUDES =
    87 !ELSE
     78!ELSE
     79MG_LIBS =
     80MG_INCLUDES =
     81!ENDIF
     82
     83!IF $(ENABLE_MGPP)
    8884MGPP_DEFS = -DENABLE_MGPP
    8985MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
    9086    "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
    9187MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\lib" -I"$(INDEXERS_DIR)\mgpp\text"
     88!ELSE
     89MGPP_DEFS =
     90MGPP_LIBS =
     91MGPP_INCLUDES =
    9292!ENDIF
    9393
  • main/trunk/greenstone2/runtime-src/src/z3950/win32.mak

    r21324 r21435  
    7272!ENDIF
    7373
    74 !IF "$(USE_SQLITE)" == "0"
     74!IF $(USE_SQLITE)
     75SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
     76!ELSE
    7577SQLITE_LIBS =
    76 !ELSE
    77 SQLITE_LIBS = "$(COMMON_PACKAGES_DIR)\sqlite\lib\sqlite3.lib"
    7878!ENDIF
    7979
    80 !IF "$(ENABLE_MG)" == "0"
    81 MG_LIBS =
    82 !ELSE
     80!IF $(ENABLE_MG)
    8381MG_LIBS = "$(INDEXERS_DIR)\mg\src\text\libmgtext.lib" \
    8482    "$(INDEXERS_DIR)\mg\lib\libmglib.lib"
     83!ELSE
     84MG_LIBS =
    8585!ENDIF
    8686
    87 !IF "$(ENABLE_MGPP)" == "0"
    88 MGPP_LIBS =
    89 MGPP_INCLUDES =
    90 !ELSE
     87!IF $(ENABLE_MGPP)
    9188MGPP_LIBS = "$(INDEXERS_DIR)\mgpp\text\libmgpptext.lib" \
    9289    "$(INDEXERS_DIR)\mgpp\lib\libmgpplib.lib"
    9390MGPP_INCLUDES = -I"$(INDEXERS_DIR)\mgpp\text"
     91!ELSE
     92MGPP_LIBS =
     93MGPP_INCLUDES =
    9494!ENDIF
    9595
  • main/trunk/greenstone2/runtime-src/win32.mak

    r21329 r21435  
    7272MAKECMD = $(MAKECMD) DLLDEBUG=1
    7373!ENDIF
    74 !IF "$(USE_SQLITE)" == ""
    75 MAKECMD = $(MAKECMD) USE_SQLITE=1
    76 !ELSE
    77 MAKECMD = $(MAKECMD) USE_SQLITE=$(USE_SQLITE)
     74!IF !$(USE_SQLITE)
     75MAKECMD = $(MAKECMD) USE_SQLITE=0
    7876!ENDIF
    7977!IF $(USE_MSSQL)
     
    8583PACKAGEDIRS = $(PACKAGEDIRS) packages\d2m $(YAZ_DIR)
    8684!ENDIF
    87 !IF "$(ENABLE_MG)" == ""
    88 MAKECMD = $(MAKECMD) ENABLE_MG=1
    89 !ELSE
    90 MAKECMD = $(MAKECMD) ENABLE_MG=$(ENABLE_MG)
     85!IF !$(ENABLE_MG)
     86MAKECMD = $(MAKECMD) ENABLE_MG=0
    9187!ENDIF
    92 !IF "$(ENABLE_MGPP)" == ""
    93 MAKECMD = $(MAKECMD) ENABLE_MGPP=1
    94 !ELSE
    95 MAKECMD = $(MAKECMD) ENABLE_MGPP=$(ENABLE_MGPP)
     88!IF !$(ENABLE_MGPP)
     89MAKECMD = $(MAKECMD) ENABLE_MGPP=0
    9690!ENDIF
    97 !IF "$(ENABLE_LUCENE)" == ""
    98 MAKECMD = $(MAKECMD) ENABLE_LUCENE=1
    99 !ELSE
    100 MAKECMD = $(MAKECMD) ENABLE_LUCENE=$(ENABLE_LUCENE)
     91!IF !$(ENABLE_LUCENE)
     92MAKECMD = $(MAKECMD) ENABLE_LUCENE=0
    10193!ENDIF
    10294
  • main/trunk/greenstone2/win32.mak

    r21379 r21435  
    3838USE_MSSQL = 0
    3939USE_Z3950 = 0
    40 
    4140# by default, all indexers are enabled
    4241ENABLE_MG = 1
     
    7574MAKECMD = $(MAKECMD) DLLDEBUG=1
    7675!ENDIF
    77 !IF "$(USE_SQLITE)" == ""
    78 MAKECMD = $(MAKECMD) USE_SQLITE=1
    79 !ELSE
    80 MAKECMD = $(MAKECMD) USE_SQLITE=$(USE_SQLITE)
     76!IF !$(USE_SQLITE)
     77MAKECMD = $(MAKECMD) USE_SQLITE=0
    8178!ENDIF
    8279!IF $(USE_MSSQL)
     
    8683MAKECMD = $(MAKECMD) USE_Z3950=1
    8784!ENDIF
    88 !IF "$(ENABLE_JNI)" == ""
    89 MAKECMD = $(MAKECMD) ENABLE_JNI=0
    90 !ELSE
    91 MAKECMD = $(MAKECMD) ENABLE_JNI=$(ENABLE_JNI)
     85!IF $(ENABLE_JNI)
     86MAKECMD = $(MAKECMD) ENABLE_JNI=1
    9287!ENDIF
    93 !IF "$(ENABLE_MG)" == ""
    94 MAKECMD = $(MAKECMD) ENABLE_MG=1
    95 !ELSE
    96 MAKECMD = $(MAKECMD) ENABLE_MG=$(ENABLE_MG)
     88!IF !$(ENABLE_MG)
     89MAKECMD = $(MAKECMD) ENABLE_MG=0
    9790!ENDIF
    98 !IF "$(ENABLE_MGPP)" == ""
    99 MAKECMD = $(MAKECMD) ENABLE_MGPP=1
    100 !ELSE
    101 MAKECMD = $(MAKECMD) ENABLE_MGPP=$(ENABLE_MGPP)
     91!IF !$(ENABLE_MGPP)
     92MAKECMD = $(MAKECMD) ENABLE_MGPP=0
    10293!ENDIF
    103 !IF "$(ENABLE_LUCENE)" == ""
    104 MAKECMD = $(MAKECMD) ENABLE_LUCENE=1
    105 !ELSE
    106 MAKECMD = $(MAKECMD) ENABLE_LUCENE=$(ENABLE_LUCENE)
     94!IF !$(ENABLE_LUCENE)
     95MAKECMD = $(MAKECMD) ENABLE_LUCENE=0
    10796!ENDIF
    10897
Note: See TracChangeset for help on using the changeset viewer.