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

Last change on this file since 26656 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
Line 
1@echo off
2
3set MAKE=nmake
4set MAKE_OPTIONS=/f
5
6if "%DEBUG%" == "" (
7 set MAKE_VARS=DEBUG=0
8) else (
9 set MAKE_VARS=DEBUG=%DEBUG%
10)
11
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
32if ""%1"" == """" goto all
33if ""%1"" == ""all"" goto go
34if ""%1"" == ""install"" goto go
35if ""%1"" == ""clean"" goto clean
36
37:unknown
38 echo Error: Unrecognized argument %1.
39 goto failed
40
41:clean
42 del bin\*
43
44:go
45 if ""%2"" == ""javaonly"" goto java
46 if ""%2"" == ""nojava"" goto nojava
47 if ""%2"" == ""without-jni"" goto without-jni
48
49:all
50:with-jni
51 if NOT EXIST "bin" mkdir bin
52
53 cd packages\windows\iconv
54 if NOT EXIST "iconv" unzip iconv.zip
55 cd iconv
56 %MAKE% %MAKE_OPTIONS% Makefile.msvc %MAKE_VARS% NO_NLS=1
57 cd ..\..\..\..
58
59 cd packages\unac
60 if NOT EXIST "iconv.h" if EXIST "iconv.h.win" copy "%CD%\iconv.h.win" iconv.h
61 %MAKE% %MAKE_OPTIONS% win32.mak %1 %MAKE_VARS%
62 cd ..\..
63
64 if "%ENABLE_MG%" == "1" (
65 cd mg
66 call winMake.bat %1
67 cd ..
68 )
69
70 if "%ENABLE_MGPP%" == "1" (
71 cd mgpp
72 call winMake.bat %1
73 cd ..
74 )
75
76 if "%ENABLE_LUCENE%" == "1" (
77 cd lucene-gs
78 call winMake.bat %1
79 cd ..
80 )
81
82 if ""%1"" == ""clean"" goto clean2
83 goto done
84
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;
90 goto done
91
92:java
93 if "%ENABLE_MG%" == "1" (
94 cd mg
95 call winMake.bat %1 javaonly
96 cd ..
97 )
98
99 if "%ENABLE_MGPP%" == "1" (
100 cd mgpp
101 call winMake.bat %1 javaonly
102 cd ..
103 )
104
105 if "%ENABLE_LUCENE%" == "1" (
106 cd lucene-gs
107 call winMake.bat %1
108 cd ..
109 )
110 goto done
111
112:nojava
113 cd packages\windows\iconv\iconv
114 %MAKE% %MAKE_OPTIONS% Makefile.msvc %MAKE_VARS% NO_NLS=1
115 cd ..\..\..\..
116
117 cd packages\unac
118 if NOT EXIST "iconv.h" if EXIST "iconv.h.win" copy "%CD%\iconv.h.win" iconv.h
119 %MAKE% %MAKE_OPTIONS% win32.mak %1 %MAKE_VARS%
120 cd ..\..
121
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 )
133 goto done
134
135:without-jni
136 if NOT EXIST "bin" mkdir bin
137
138 cd packages\windows\iconv\iconv
139 %MAKE% %MAKE_OPTIONS% Makefile.msvc %MAKE_VARS% NO_NLS=1
140 cd ..\..\..\..
141
142 cd packages\unac
143 if NOT EXIST "iconv.h" if EXIST "iconv.h.win" copy "%CD%\iconv.h.win" iconv.h
144 %MAKE% %MAKE_OPTIONS% win32.mak %1 %MAKE_VARS%
145 cd ..\..
146
147 if "%ENABLE_MG%" == "1" (
148 cd mg
149 call winMake.bat %1 nojava
150 cd ..
151 )
152
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 )
164 goto done
165
166
167:failed
168echo ***** Compilation terminated with failure in %~dp0%0
169exit /b 1
170
171:done
Note: See TracBrowser for help on using the repository browser.