File: Makefile.am

package info (click to toggle)
xapian-bindings 1.4.29-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,436 kB
  • sloc: cpp: 379,853; python: 10,780; cs: 9,529; java: 6,949; sh: 4,629; perl: 4,435; makefile: 1,274; ruby: 1,028; php: 586; tcl: 246
file content (220 lines) | stat: -rw-r--r-- 7,055 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
## Process this file with automake to produce Makefile.in

include ../generic/generic.mk

# Disable parallel build for this make invocation; javac seems to write
# .class files in place, and it also reads existing .class files - the
# combination means that in a parallel build it can read partial .class
# and then fail with various odd errors.
.NOTPARALLEL:

## Test programs to be run
TESTS = SmokeTest.class
AM_TESTS_ENVIRONMENT = \
	LIBTOOL="$(LIBTOOL)" ;\
	JAVA="$(JAVA) $(JAVA_CHECK_JNI_OPTION)" ;\
	PATHSEP="$(JAVA_PATHSEP)" ;\
	_libs="$(_libs)" ;\
	export LIBTOOL ;\
	export JAVA ;\
	export PATHSEP ;\
	export _libs ;
LOG_COMPILER = $(srcdir)/run-java-test

CLEANFILES = SmokeTest.class MyMatchDecider.class MyExpandDecider.class\
	MyFieldProcessor.class\
	built/xapian.jar\
	$(XAPIAN_SWIG_JAVA_CLASS) $(XAPIAN_SWIG_JAVA_EXTRA_CLASSES)

SmokeTest: SmokeTest.class

# To get debug symbols, use: make JAVACFLAGS=-g
.java.class:
	$(JAVAC) $(JAVACFLAGS) -classpath .$(JAVA_PATHSEP)$(srcdir) -d . $<

XAPIAN_SWIG_JAVA_SRCS=\
	org/xapian/Auto.java\
	org/xapian/BB2Weight.java\
	org/xapian/BM25PlusWeight.java\
	org/xapian/BM25Weight.java\
	org/xapian/BoolWeight.java\
	org/xapian/Chert.java\
	org/xapian/Compactor.java\
	org/xapian/CoordWeight.java\
	org/xapian/Database.java\
	org/xapian/DateRangeProcessor.java\
	org/xapian/DateValueRangeProcessor.java\
	org/xapian/DecreasingValueWeightPostingSource.java\
	org/xapian/DLHWeight.java\
	org/xapian/DPHWeight.java\
	org/xapian/Document.java\
	org/xapian/Enquire.java\
	org/xapian/ESet.java\
	org/xapian/ESetIterator.java\
	org/xapian/ExpandDecider.java\
	org/xapian/ExpandDeciderAnd.java\
	org/xapian/ExpandDeciderFilterPrefix.java\
	org/xapian/FieldProcessor.java\
	org/xapian/FixedWeightPostingSource.java\
	org/xapian/GreatCircleMetric.java\
	org/xapian/IfB2Weight.java\
	org/xapian/IneB2Weight.java\
	org/xapian/InL2Weight.java\
	org/xapian/InMemory.java\
	org/xapian/KeyMaker.java\
	org/xapian/LMWeight.java \
	org/xapian/LatLongCoord.java\
	org/xapian/LatLongCoords.java\
	org/xapian/LatLongCoordsIterator.java\
	org/xapian/LatLongDistanceKeyMaker.java\
	org/xapian/LatLongDistancePostingSource.java\
	org/xapian/LatLongMetric.java\
	org/xapian/MatchDecider.java\
	org/xapian/MatchSpy.java\
	org/xapian/MSet.java\
	org/xapian/MSetIterator.java\
	org/xapian/MultiValueKeyMaker.java\
	org/xapian/NumberRangeProcessor.java\
	org/xapian/NumberValueRangeProcessor.java\
	org/xapian/PL2PlusWeight.java\
	org/xapian/PL2Weight.java\
	org/xapian/PositionIterator.java\
	org/xapian/PostingIterator.java\
	org/xapian/PostingSource.java\
	org/xapian/Query.java\
	org/xapian/QueryParser.java\
	org/xapian/RangeProcessor.java\
	org/xapian/Registry.java\
	org/xapian/Remote.java\
	org/xapian/RSet.java\
	org/xapian/SimpleStopper.java\
	org/xapian/Stem.java\
	org/xapian/StemImplementation.java\
	org/xapian/Stopper.java\
	org/xapian/StringValueRangeProcessor.java\
	org/xapian/SWIGTYPE_p_std__string.java\
	org/xapian/TermGenerator.java\
	org/xapian/TermIterator.java\
	org/xapian/TfIdfWeight.java\
	org/xapian/TradWeight.java\
	org/xapian/ValueCountMatchSpy.java\
	org/xapian/ValueIterator.java\
	org/xapian/ValueMapPostingSource.java\
	org/xapian/ValuePostingSource.java\
	org/xapian/ValueRangeProcessor.java\
	org/xapian/ValueSetMatchDecider.java\
	org/xapian/ValueWeightPostingSource.java\
	org/xapian/Version.java\
	org/xapian/Weight.java\
	org/xapian/WritableDatabase.java\
	org/xapian/Xapian.java\
	org/xapian/XapianConstants.java\
	org/xapian/XapianJNI.java

XAPIAN_SWIG_JAVA_CLASS = $(XAPIAN_SWIG_JAVA_SRCS:.java=.class)

# Java generates nested classes with filenames containing a $ (smart move) so
# we pick them up with a wildcard and omit them from dependencies to avoid
# escaping hell.  The lack of a dependency shouldn't really be an issue since
# these classes are always generated along with the containing class which
# is listed in the dependencies.
XAPIAN_SWIG_JAVA_EXTRA_CLASSES=\
	org/xapian/Compactor*compaction_level.class\
	org/xapian/Enquire*docid_order.class\
	org/xapian/Query*1.class\
	org/xapian/Query*op.class\
	org/xapian/QueryParser*feature_flag.class\
	org/xapian/QueryParser*stem_strategy.class\
	org/xapian/TermGenerator*flags.class\
	org/xapian/TermGenerator*stem_strategy.class\
	org/xapian/TermGenerator*stop_strategy.class\
	org/xapian/Weight*type_smoothing.class

noinst_DATA = built/xapian.jar

built/xapian.jar: $(XAPIAN_SWIG_JAVA_CLASS)
	$(MKDIR_P) built
	$(JAR) -cf built/xapian.jar org/xapian/*.class
##$(XAPIAN_SWIG_JAVA_CLASS) $(XAPIAN_SWIG_JAVA_EXTRA_CLASSES)

jnidir = $(abs_builddir)/built

jni_LTLIBRARIES = libxapian_jni.la

# Remove the .la file - libxapian_jni.la is never linked against (it's a
# module) and JVMs don't use libltdl.  Note that the library gets installed by
# install-data, so that's where we need to hook.
install-data-hook:
	rm -f $(DESTDIR)$(jnidir)/libxapian_jni.la

# Because we don't install the .la file, "make uninstall" doesn't work and
# we need to remove the file ourselves.
uninstall-local:
if NEED_JNILIB_EXT
	rm -f $(DESTDIR)$(jnidir)/libxapian_jni.jnilib
else
	eval `grep '^dlname=' $(jni_LTLIBRARIES)` ; \
	  rm -f $(DESTDIR)$(jnidir)/"$$dlname"
endif

if NEED_JNILIB_EXT
SHREXT=-shrext .jnilib
else
SHREXT=
endif
AM_CXXFLAGS = $(SWIG_CXXFLAGS) $(XAPIAN_CXXFLAGS)
AM_CPPFLAGS = $(JAVA_CPPFLAGS)
libxapian_jni_la_LDFLAGS = -avoid-version -module $(SHREXT) $(NO_UNDEFINED)
libxapian_jni_la_LIBADD = $(XAPIAN_LIBS)
libxapian_jni_la_SOURCES = xapian_wrap.cc

SWIG_GENERATED = xapian_wrap.cc xapian_wrap.h $(XAPIAN_SWIG_JAVA_SRCS)

BUILT_SOURCES = $(SWIG_GENERATED)

EXTRA_DIST = java.i run-java-test SmokeTest.java docs/index.rst $(SWIG_GENERATED)

if MAINTAINER_MODE
stamp = xapian_wrap.stamp
RUN_SWIG = stamp='$(stamp)' $(PERL) '$(top_srcdir)'/swig-depcomp $(SWIG)

xapian_wrap.cc xapian_wrap.h $(XAPIAN_SWIG_JAVA_SRCS): $(stamp)
	$(make_many_locked)
$(stamp):
	$(multitarget_begin)
	: # Make sure that we don't package stale generated sources in the
	: # case where SWIG changes its mind as to which files it generates.
	-rm -f org/xapian/*
	$(MKDIR_P) org/xapian
	$(RUN_SWIG) $(SWIG_WERROR) -I'$(srcdir)' $(SWIG_FLAGS) -c++ \
	    -java -module Xapian -package org.xapian -outdir org/xapian \
	    -o xapian_wrap.cc '$(srcdir)/'java.i
	: # Check that exactly the sources we expected were generated.
	$(PERL) -e 'print "$$_\n" for sort @ARGV' org/xapian/*.java > org/xapian/list
	$(PERL) -e 'print "$$_\n" for sort @ARGV' $(XAPIAN_SWIG_JAVA_SRCS)|diff -c - org/xapian/list
	$(multitarget_end)

-include xapian_wrap.d

CLEANFILES += $(stamp)
endif
MAINTAINERCLEANFILES = $(BUILT_SOURCES)

maintainer-clean-local:
	rm -rf built org

exampledatadir = $(docdir)/java/examples
dist_exampledata_DATA =\
	docs/examples/SimpleSearch.java\
	docs/examples/SimpleIndex.java

docdatadir = $(docdir)/java
dist_docdata_DATA = docs/index.html

if DOCUMENTATION_RULES
BUILT_SOURCES += docs/index.html

.rst.html:
	-case "$@" in */*) d=`echo "$@"|sed 's,/[^/]*$$,,'`; $(MKDIR_P) "$$d" ;; esac
	$(RST2HTML) --exit-status=warning $< $@
endif