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 |
|
---|
32 | ENABLE_ACCENTFOLD=@ENABLE_ACCENTFOLD@
|
---|
33 | ifeq ($(ENABLE_ACCENTFOLD), 1)
|
---|
34 | UNAC=packages/unac
|
---|
35 | else
|
---|
36 | UNAC=
|
---|
37 | endif
|
---|
38 |
|
---|
39 | INDEXERDIRS = $(UNAC) mg mgpp lucene-gs
|
---|
40 |
|
---|
41 | all install clean:
|
---|
42 | for odir in $(INDEXERDIRS); do \
|
---|
43 | echo making $@ in $$odir; \
|
---|
44 | (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
|
---|
45 | done
|
---|
46 |
|
---|
47 | nojava:
|
---|
48 | for odir in $(UNAC); do \
|
---|
49 | echo making $@ in $$odir; \
|
---|
50 | (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
|
---|
51 | done
|
---|
52 | for odir in mg mgpp; do \
|
---|
53 | echo making $@ in $$odir; \
|
---|
54 | (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
|
---|
55 | done
|
---|
56 |
|
---|
57 | install-nojava:
|
---|
58 | for odir in $(UNAC); do \
|
---|
59 | echo making $@ in $$odir; \
|
---|
60 | (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
|
---|
61 | done
|
---|
62 | for odir in mg mgpp; do \
|
---|
63 | echo making $@ in $$odir; \
|
---|
64 | (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
|
---|
65 | done
|
---|
66 |
|
---|
67 | javaonly:
|
---|
68 | for odir in mg mgpp; do \
|
---|
69 | echo making $@ in $$odir; \
|
---|
70 | (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
|
---|
71 | done
|
---|
72 | for odir in lucene-gs; do \
|
---|
73 | echo making $@ in $$odir; \
|
---|
74 | (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
|
---|
75 | done
|
---|
76 |
|
---|
77 | install-javaonly:
|
---|
78 | for odir in mg mgpp; do \
|
---|
79 | echo making $@ in $$odir; \
|
---|
80 | (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
|
---|
81 | done
|
---|
82 | for odir in lucene-gs; do \
|
---|
83 | echo making $@ in $$odir; \
|
---|
84 | (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
|
---|
85 | done
|
---|
86 |
|
---|
87 | # make everything except jni stuff
|
---|
88 | gs2:
|
---|
89 | for odir in $(UNAC) lucene-gs; do \
|
---|
90 | echo making $@ in $$odir; \
|
---|
91 | (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
|
---|
92 | done
|
---|
93 | for odir in mg mgpp; do \
|
---|
94 | echo making $@ in $$odir; \
|
---|
95 | (cd $$odir && $(MAKE) $(MDEFINES) nojava) || exit 1; \
|
---|
96 | done
|
---|
97 |
|
---|
98 | install-gs2:
|
---|
99 | for odir in $(UNAC) lucene-gs; do \
|
---|
100 | echo making $@ in $$odir; \
|
---|
101 | (cd $$odir && $(MAKE) $(MDEFINES) install) || exit 1; \
|
---|
102 | done
|
---|
103 | for odir in mg mgpp; do \
|
---|
104 | echo making $@ in $$odir; \
|
---|
105 | (cd $$odir && $(MAKE) $(MDEFINES) install-nojava) || exit 1; \
|
---|
106 | done
|
---|
107 |
|
---|
108 | distclean:
|
---|
109 | for odir in $(INDEXERDIRS); do \
|
---|
110 | echo making $@ in $$odir; \
|
---|
111 | (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
|
---|
112 | done
|
---|
113 | rm -f Makefile config.status config.log |
---|