source: main/trunk/greenstone2/common-src/indexers/Makefile.in@ 22058

Last change on this file since 22058 was 22058, checked in by ak19, 14 years ago

Changes to makefiles to 1. incorporate USE_GDBM and USE_JDBM flags (and USE_SQLITE) in most places so that the DEFINES variable is set at all times. This is necessary to ensure that all classes that contain objects with gdbm and jdbm members are of a consistent size. Else we've had experience with Greenstone crashing with memory errors (to do with the similar ENABLE_indexer flags). 2. ENABLE_JDBM is now USE_JDBM. 3. Not everything works now. It still compiles the default way, but the disable-gdbm flag is causing trouble when compiling argdb in recpt since it uses that.

  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1###########################################################################
2#
3# Makefile -- Makefile for indexers used by Greenstone
4#
5# A component of the Greenstone digital library software
6# from the New Zealand Digital Library Project at the
7# University of Waikato, New Zealand.
8#
9# Copyright (C) 2007 New Zealand Digital Library Project
10#
11# This program is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24#
25###########################################################################
26
27
28# INDEXERDIRS contains the packages that we want to make and install. It
29# is assumed that each package will have at least four rules: all, install,
30# clean, and distclean.
31
32ENABLE_ACCENTFOLD=@ENABLE_ACCENTFOLD@
33ifeq ($(ENABLE_ACCENTFOLD), 1)
34UNAC=packages/unac
35else
36UNAC=
37endif
38
39ENABLE_MG=@ENABLE_MG@
40ifeq ($(ENABLE_MG), 1)
41MG=mg
42else
43MG=
44endif
45
46ENABLE_MGPP=@ENABLE_MGPP@
47ifeq ($(ENABLE_MGPP), 1)
48MGPP=mgpp
49else
50MGPP=
51endif
52
53ENABLE_LUCENE=@ENABLE_LUCENE@
54ifeq ($(ENABLE_LUCENE), 1)
55LUCENE=lucene-gs
56else
57LUCENE=
58endif
59
60USE_GDBM = @USE_GDBM@
61ifeq ($(USE_GDBM), 1)
62GDBM_DEFINES = -DUSE_GDBM
63else
64GDBM_DEFINES =
65endif
66
67USE_JDBM = @USE_JDBM@
68ifeq ($(USE_JDBM), 1)
69JDBM_DEFINES = -DUSE_JDBM
70else
71JDBM_DEFINES =
72endif
73
74USE_SQLITE = @USE_SQLITE@
75ifeq ($(USE_SQLITE), 1)
76USE_SQLITE = -DUSE_SQLITE
77else
78USE_SQLITE =
79endif
80
81INDEXERDIRS = $(UNAC) $(MG) $(MGPP) $(LUCENE)
82DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
83
84clean:
85 for odir in $(INDEXERDIRS); do \
86 if test -d $$odir; then \
87 echo making $@ in $$odir; \
88 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
89 fi; \
90 done
91
92with-jni:
93 for odir in $(INDEXERDIRS); do \
94 if test -d $$odir; then \
95 echo making all in $$odir; \
96 (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
97 fi; \
98 done
99
100install-with-jni:
101 for odir in $(INDEXERDIRS); do \
102 if test -d $$odir; then \
103 echo making install in $$odir; \
104 (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
105 fi; \
106 done
107
108# make everything except jni stuff
109without-jni:
110 for odir in $(UNAC) $(LUCENE); do \
111 echo making $@ in $$odir; \
112 (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
113 done
114 for odir in $(MG) $(MGPP); do \
115 echo making $@ in $$odir; \
116 (cd $$odir && $(MAKE) $(MDEFINES) nojava) || exit 1; \
117 done
118
119install-without-jni:
120 for odir in $(UNAC) $(LUCENE); do \
121 echo making $@ in $$odir; \
122 (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
123 done
124 for odir in $(MG) $(MGPP); do \
125 echo making $@ in $$odir; \
126 (cd $$odir && $(MAKE) $(MDEFINES) install-nojava) || exit 1; \
127 done
128
129nojava:
130 for odir in $(UNAC); do \
131 echo making $@ in $$odir; \
132 (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
133 done
134 for odir in $(MG) $(MGPP); do \
135 echo making $@ in $$odir; \
136 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
137 done
138
139install-nojava:
140 for odir in $(UNAC); do \
141 echo making $@ in $$odir; \
142 (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
143 done
144 for odir in $(MG) $(MGPP); do \
145 echo making $@ in $$odir; \
146 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
147 done
148
149javaonly:
150 for odir in $(MG) $(MGPP); do \
151 echo making $@ in $$odir; \
152 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
153 done
154 for odir in $(LUCENE); do \
155 echo making $@ in $$odir; \
156 (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
157 done
158
159install-javaonly:
160 for odir in $(MG) $(MGPP); do \
161 echo making $@ in $$odir; \
162 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
163 done
164 for odir in $(LUCENE); do \
165 echo making $@ in $$odir; \
166 (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
167 done
168
169distclean:
170 for odir in $(INDEXERDIRS); do \
171 if test -d $$odir; then \
172 echo making $@ in $$odir; \
173 (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
174 fi; \
175 done
176 rm -f Makefile config.status config.log
Note: See TracBrowser for help on using the repository browser.