source: main/trunk/greenstone2/common-src/indexers/winMake.bat@ 32291

Last change on this file since 32291 was 22779, checked in by mdewsnip, 14 years ago

Changed common-src/indexers/winMake.bat to copy instead of rename the iconv.h.win file to iconv.h, so it doesn't leave a hole in SVN.

  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
RevLine 
[13728]1@echo off
2
3set MAKE=nmake
4set MAKE_OPTIONS=/f
5
[19524]6if "%DEBUG%" == "" (
7 set MAKE_VARS=DEBUG=0
8) else (
9 set MAKE_VARS=DEBUG=%DEBUG%
10)
11
[21328]12:: ENABLE_MG/MGPP/LUCENE are guaranteed to be set to either 1 or 0 at this point
13set MAKE_VARS=%MAKE_VARS% ENABLE_MG=%ENABLE_MG%
14set MAKE_VARS=%MAKE_VARS% ENABLE_MGPP=%ENABLE_MGPP%
15set MAKE_VARS=%MAKE_VARS% ENABLE_LUCENE=%ENABLE_LUCENE%
16
17if "%ENABLE_MG%" == "1" if not exist mg (
18 echo ***** Folder mg does not exist, cannot ENABLE_MG.
19 goto failed
20)
21
22if "%ENABLE_MGPP%" == "1" if not exist mgpp (
23 echo ***** Folder mgpp does not exist, cannot ENABLE_MGPP.
24 goto failed
25)
26
27if "%ENABLE_LUCENE%" == "1" if not exist lucene-gs (
28 echo ***** Folder lucene-gs does not exist, cannot ENABLE_LUCENE.
29 goto failed
30)
31
[13728]32if ""%1"" == """" goto all
[13755]33if ""%1"" == ""all"" goto go
[13728]34if ""%1"" == ""install"" goto go
[13755]35if ""%1"" == ""clean"" goto clean
[13728]36
37:unknown
38 echo Error: Unrecognized argument %1.
[21328]39 goto failed
[13728]40
[13755]41:clean
42 del bin\*
[13840]43
44:go
[13755]45 if ""%2"" == ""javaonly"" goto java
46 if ""%2"" == ""nojava"" goto nojava
[21364]47 if ""%2"" == ""without-jni"" goto without-jni
[13755]48
[13728]49:all
[21364]50:with-jni
[16907]51 if NOT EXIST "bin" mkdir bin
52
[18310]53 cd packages\windows\iconv
54 if NOT EXIST "iconv" unzip iconv.zip
55 cd iconv
[19524]56 %MAKE% %MAKE_OPTIONS% Makefile.msvc %MAKE_VARS% NO_NLS=1
[16907]57 cd ..\..\..\..
[16903]58
[13755]59 cd packages\unac
[22779]60 if NOT EXIST "iconv.h" if EXIST "iconv.h.win" copy "%CD%\iconv.h.win" iconv.h
[19524]61 %MAKE% %MAKE_OPTIONS% win32.mak %1 %MAKE_VARS%
[13755]62 cd ..\..
[13728]63
[21328]64 if "%ENABLE_MG%" == "1" (
65 cd mg
66 call winMake.bat %1
67 cd ..
68 )
[13728]69
[21328]70 if "%ENABLE_MGPP%" == "1" (
71 cd mgpp
72 call winMake.bat %1
73 cd ..
74 )
[19524]75
[21328]76 if "%ENABLE_LUCENE%" == "1" (
77 cd lucene-gs
78 call winMake.bat %1
79 cd ..
80 )
81
[19524]82 if ""%1"" == ""clean"" goto clean2
[13728]83 goto done
84
[19524]85:: Need another clean because a pre-all clean command sent to iconv regenerates some lib
86:: and object files. So we delete these after it's finished processing the clean command
87:clean2
88 for %%I in (lib srclib libcharset\lib) do if exist packages\windows\iconv\iconv\%%I\^*.obj del packages\windows\iconv\iconv\%%I\*.obj;
89 for %%I in (lib srclib libcharset\lib) do if exist packages\windows\iconv\iconv\%%I\^*.lib del packages\windows\iconv\iconv\%%I\*.lib;
[21364]90 goto done
[19524]91
[13728]92:java
[21328]93 if "%ENABLE_MG%" == "1" (
94 cd mg
95 call winMake.bat %1 javaonly
96 cd ..
97 )
[13728]98
[21328]99 if "%ENABLE_MGPP%" == "1" (
100 cd mgpp
101 call winMake.bat %1 javaonly
102 cd ..
103 )
[13728]104
[21328]105 if "%ENABLE_LUCENE%" == "1" (
106 cd lucene-gs
107 call winMake.bat %1
108 cd ..
109 )
[13728]110 goto done
111
112:nojava
[16907]113 cd packages\windows\iconv\iconv
[19524]114 %MAKE% %MAKE_OPTIONS% Makefile.msvc %MAKE_VARS% NO_NLS=1
[16907]115 cd ..\..\..\..
116
[13755]117 cd packages\unac
[22779]118 if NOT EXIST "iconv.h" if EXIST "iconv.h.win" copy "%CD%\iconv.h.win" iconv.h
[19524]119 %MAKE% %MAKE_OPTIONS% win32.mak %1 %MAKE_VARS%
[13755]120 cd ..\..
[13728]121
[21328]122 if "%ENABLE_MG%" == "1" (
123 cd mg
124 call winMake.bat %1 nojava
125 cd ..
126 )
127
128 if "%ENABLE_MGPP%" == "1" (
129 cd mgpp
130 call winMake.bat %1 nojava
131 cd ..
132 )
[13728]133 goto done
[13840]134
[21364]135:without-jni
[16064]136 if NOT EXIST "bin" mkdir bin
[16907]137
138 cd packages\windows\iconv\iconv
[19524]139 %MAKE% %MAKE_OPTIONS% Makefile.msvc %MAKE_VARS% NO_NLS=1
[16907]140 cd ..\..\..\..
141
[16064]142 cd packages\unac
[22779]143 if NOT EXIST "iconv.h" if EXIST "iconv.h.win" copy "%CD%\iconv.h.win" iconv.h
[19524]144 %MAKE% %MAKE_OPTIONS% win32.mak %1 %MAKE_VARS%
[16064]145 cd ..\..
146
[21328]147 if "%ENABLE_MG%" == "1" (
148 cd mg
149 call winMake.bat %1 nojava
150 cd ..
151 )
[16064]152
[21328]153 if "%ENABLE_MGPP%" == "1" (
154 cd mgpp
155 call winMake.bat %1 nojava
156 cd ..
157 )
158
159 if "%ENABLE_LUCENE%" == "1" (
160 cd lucene-gs
161 call winMake.bat %1
162 cd ..
163 )
[16064]164 goto done
165
[21328]166
167:failed
168echo ***** Compilation terminated with failure in %~dp0%0
169exit /b 1
170
[13728]171:done
Note: See TracBrowser for help on using the repository browser.