root/main/trunk/greenstone2/common-src/Makefile.in @ 29147

Revision 29147, 4.5 KB (checked in by ak19, 6 years ago)

Part of port from lucene3.3.0 to lucene4.7.2. Updating common-src makefiles to use LuceneWrapper?4 instead of LuceneWrapper?3.

  • Property svn:executable set to *
Line 
1###########################################################################
2#
3# Makefile -- common code between gsdl runtime and buildtime
4# A component of the Greenstone digital library software
5# from the New Zealand Digital Library Project at the
6# University of Waikato, New Zealand.
7#
8# Copyright (C) 1999  The New Zealand Digital Library Project
9#
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###########################################################################
26srcdir = @srcdir@
27
28PACKAGE = @PACKAGE@
29VERSION = @VERSION@
30
31@SET_MAKE@
32CC = @CC@
33CXX = @CXX@
34CFLAGS = @CFLAGS@
35CXXFLAGS = @CXXFLAGS@
36LIBS   = @LIBS@
37MDEFINES =
38
39GSDLOS = @gsdlos@
40GSDLARCH = @gsdlarch@
41
42COMPILE = $(CC) -c $(CFLAGS)
43CXXCOMPILE = $(CXX) -c $(CXXFLAGS)
44
45SOURCES =
46
47OBJECTS =
48
49ALLFILES = $(OBJECTS)
50
51# indexers are treated slightly differently as we don't want to do make all/install for gs2
52INDEXERSDIR = indexers
53
54# all directories should be compiled
55COMPILEDIRS = cgi-bin packages src/lib src/getpw
56
57# a subset of the directories get installed
58INSTALLDIRS = cgi-bin packages src/getpw
59
60
61USE_GDBM=@USE_GDBM@
62ifeq ($(USE_GDBM), 1)
63COMPILEDIRS += src/gdbmedit/txt2db src/gdbmedit/db2txt \
64  src/gdbmedit/gdbmget src/gdbmedit/gdbmset \
65  src/gdbmedit/gdbmkeys src/gdbmedit/gdbmdel
66INSTALLDIRS += src/gdbmedit/db2txt src/gdbmedit/txt2db \
67  src/gdbmedit/gdbmget src/gdbmedit/gdbmset \
68  src/gdbmedit/gdbmkeys src/gdbmedit/gdbmdel
69GDBM_DEFINES = -DUSE_GDBM
70else
71GDBM_DEFINES =
72endif
73
74USE_JDBM=@USE_JDBM@
75ifeq ($(USE_JDBM), 1)
76COMPILEDIRS += src/jdbmedit
77INSTALLDIRS += src/jdbmedit
78JDBM_DEFINES = -DUSE_JDBM
79else
80JDBM_DEFINES =
81endif
82
83USE_SQLITE = @USE_SQLITE@
84ifeq ($(USE_SQLITE), 1)
85SQLITE_DEFINES = -DUSE_SQLITE
86else
87SQLITE_DEFINES =
88endif
89
90MODULEDIRS = @MODULEDIRS@
91DEFS = @DEFS@ $(GDBM_DEFINES) $(JDBM_DEFINES) $(SQLITE_DEFINES)
92
93with-jni without-jni:
94    for odir in $(INDEXERSDIR); do \
95      echo making $@ in $$odir; \
96      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
97    done
98    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \
99      echo making all in $$odir; \
100      (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
101    done
102
103install-with-jni:
104    for odir in $(INDEXERSDIR); do \
105      echo making $@ in $$odir; \
106      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
107    done
108    if test -e $(INDEXERSDIR)/lucene-gs/LuceneWrapper4.jar; then \
109      cp $(INDEXERSDIR)/lucene-gs/LuceneWrapper4.jar ../bin/java/.; \
110    fi
111    for idir in $(INSTALLDIRS); do \
112      echo installing $$idir; \
113      (cd $$idir && $(MAKE) install) || exit 1; \
114    done
115
116install-without-jni:
117    for odir in $(INDEXERSDIR); do \
118      echo making $@ in $$odir; \
119      (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
120    done
121    if test -e $(INDEXERSDIR)/lucene-gs/LuceneWrapper4.jar; then \
122      cp $(INDEXERSDIR)/lucene-gs/LuceneWrapper4.jar ../bin/java/.; \
123    fi
124    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \
125      echo making install in $$odir; \
126      (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
127    done
128
129distclean: clean
130    rm -f Makefile config.cache config.h config.log stamp-h config.status
131    for subdir in $(COMPILEDIRS) $(INDEXERSDIR); do \
132      echo cleaning $@ in $$subdir; \
133      (cd $$subdir && $(MAKE) distclean) || exit 1; \
134    done
135
136clean:
137    for subdir in $(COMPILEDIRS) $(INDEXERSDIR); do \
138      echo cleaning $@ in $$subdir; \
139      (cd $$subdir && $(MAKE) clean) || exit 1; \
140    done
141
142
143# commented out - jrm21 Dec 2004 - can get confused by cvs timestamps
144# (and might run the wrong version of autoconf)
145#
146## For an explanation of the following Makefile rules, see node
147## `Automatic Remaking' in GNU Autoconf documentation.
148#Makefile: Makefile.in config.status
149#   CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
150#config.status: configure
151#   ./config.status --recheck
152#configure: configure.in aclocal.m4
153#   cd $(srcdir) && autoconf
154#
155#config.h: stamp-h
156#stamp-h: config.h.in config.status
157#   CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
158#config.h.in: stamp-h.in
159#stamp-h.in: configure.in aclocal.m4 acconfig.h
160#   cd $(srcdir) && autoheader
161#   $(TOUCH) $(srcdir)/stamp-h.in
162
163
164
Note: See TracBrowser for help on using the browser.