source: main/trunk/greenstone2/common-src/indexers/lucene-gs/Makefile.in

Last change on this file was 35385, checked in by kjdon, 3 years ago

add JAVACFLAGS back in - source and target have been updated to 1.6 (and soon to go to 1.8), so lucene works with these now. We need to make sure all compiled java code is the same version. Also added delete all classes from LuceneWrapper4 dir under a make clean - otherwise you end up with some inner compiled classes with a wrong version if you do a make clean then change the java version

  • Property svn:keywords set to Author Date Id Revision
File size: 4.3 KB
Line 
1JAVAC = @JAVAC@
2JAVACFLAGS = @JAVACFLAGS@
3JAR = jar
4JAVADEBUGFLAGS = #-Xlint:deprecation -Xlint:unchecked
5
6LUCENE_VER = 4.7.2
7
8
9LUCENE3_JAR = ./lib/lucene-core-3.3.0.jar
10#LUCENE3_JAR = ./lib/lucene-core-3.6.0.jar
11
12# To have a manifest file that lists the jar dependencies for a jar file:
13
14# http://docs.oracle.com/javase/tutorial/deployment/jar/downman.html
15# https://blogs.oracle.com/olaf/entry/jdev_including_a_classpath_in
16# http://www.coderanch.com/t/482185/java/java/classpath
17# http://todayguesswhat.blogspot.co.nz/2011/03/jar-manifestmf-class-path-referencing.html
18# http://stackoverflow.com/questions/9684737/class-not-found-despite-of-classpath-in-manifest
19# http://stackoverflow.com/questions/219585/setting-multiple-jars-in-java-classpath
20# JAVA 6 JVM and later allows use of wildcards in classpath
21# http://stackoverflow.com/questions/11607873/escape-wildcard-processing-in-java-classpath/11608165#comment15368871_11608165
22# http://docs.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html
23
24
25LUCENE4_WRAPPER_OBJECTS = \
26 classes4/org/greenstone/LuceneWrapper4/GSLuceneConstants.class \
27 classes4/org/greenstone/LuceneWrapper4/GSLuceneUtil.class \
28 classes4/org/greenstone/LuceneWrapper4/GS2Analyzer.class \
29 classes4/org/greenstone/LuceneWrapper4/GS2LuceneDelete.class \
30 classes4/org/greenstone/LuceneWrapper4/GS2LuceneEditor.class \
31 classes4/org/greenstone/LuceneWrapper4/GS2LuceneIndexer.class \
32 classes4/org/greenstone/LuceneWrapper4/GS2LuceneQuery.class \
33 classes4/org/greenstone/LuceneWrapper4/LuceneQueryResult.class \
34 classes4/org/greenstone/LuceneWrapper4/SharedSoleneQuery.class \
35 classes4/org/greenstone/LuceneWrapper4/SharedSoleneQueryResult.class
36
37LUCENE4_WRAPPER_JAR = LuceneWrapper4.jar
38
39
40LUCENE3_WRAPPER_OBJECTS = \
41 classes3/org/greenstone/LuceneWrapper3/GS2Analyzer.class \
42 classes3/org/greenstone/LuceneWrapper3/GS2IndexModifier.class \
43 classes3/org/greenstone/LuceneWrapper3/GS2LuceneDelete.class \
44 classes3/org/greenstone/LuceneWrapper3/GS2LuceneEditor.class \
45 classes3/org/greenstone/LuceneWrapper3/GS2LuceneIndexer.class \
46 classes3/org/greenstone/LuceneWrapper3/GS2LuceneQuery.class \
47 classes3/org/greenstone/LuceneWrapper3/LuceneQueryResult.class \
48 classes3/org/greenstone/LuceneWrapper3/SharedSoleneQuery.class \
49 classes3/org/greenstone/LuceneWrapper3/SharedSoleneQueryResult.class
50
51LUCENE3_WRAPPER_JAR = LuceneWrapper3.jar
52
53classes4/org/greenstone/LuceneWrapper4/%.class: src/org/greenstone/LuceneWrapper4/%.java
54ifeq ($(GSDLOS),windows)
55 mkdir -p classes4 && $(JAVAC) $(JAVACFLAGS) $(JAVADEBUGFLAGS) -classpath "lib/lucene4/*;classes4;." -d classes4 -sourcepath src/ src/org/greenstone/LuceneWrapper4/$*.java
56else
57 mkdir -p classes4 && $(JAVAC) $(JAVACFLAGS) $(JAVADEBUGFLAGS) -classpath "lib/lucene4/*:classes4:." -d classes4 -sourcepath src/ src/org/greenstone/LuceneWrapper4/$*.java
58endif
59
60LuceneWrapper4.jar: $(LUCENE4_WRAPPER_OBJECTS)
61 cd classes4 && for jar in ../lib/lucene4/*$(LUCENE_VER).jar; do \
62 jar xf $$jar; \
63 done
64 cp LICENSE.txt classes4/META-INF/LICENSE-LUCENE_WRAPPER.txt
65 cp LICENSE-GPLv2.txt classes4/META-INF/.
66 cp LICENSE-GPLv3.txt classes4/META-INF/.
67 $(JAR) cf $(LUCENE4_WRAPPER_JAR) -C classes4 .
68
69
70classes3/org/greenstone/LuceneWrapper3/%.class: src/org/greenstone/LuceneWrapper3/%.java
71ifeq ($(GSDLOS),windows)
72 mkdir -p classes3 && $(JAVAC) $(JAVACFLAGS) -classpath "$(LUCENE3_JAR);classes3;." -d classes3 -sourcepath src/ src/org/greenstone/LuceneWrapper3/$*.java
73else
74 mkdir -p classes3 && $(JAVAC) $(JAVACFLAGS) -classpath $(LUCENE3_JAR):classes3:. -d classes3 -sourcepath src/ src/org/greenstone/LuceneWrapper3/$*.java
75endif
76
77LuceneWrapper3.jar: $(LUCENE3_WRAPPER_OBJECTS)
78 cd classes3 && jar xf ../$(LUCENE3_JAR)
79 $(JAR) cf $(LUCENE3_WRAPPER_JAR) -C classes3 .
80
81
82all: $(LUCENE4_WRAPPER_JAR)
83# $(LUCENE3_WRAPPER_JAR)
84install: all
85
86clean:
87 /bin/rm -f $(LUCENE4_WRAPPER_OBJECTS) $(LUCENE4_WRAPPER_JAR)
88 /bin/rm -f classes4/org/greenstone/LuceneWrapper4/*.class
89 /bin/rm -f $(LUCENE3_WRAPPER_OBJECTS) $(LUCENE3_WRAPPER_JAR)
90 /bin/rm -f classes3/org/greenstone/LuceneWrapper3/*.class
91
92distclean: clean
93 if test -e classes4; then /bin/rm -r classes4; fi
94 if test -e $(LUCENE4_WRAPPER_JAR); then /bin/rm -r $(LUCENE4_WRAPPER_JAR); fi
95 if test -e classes3; then /bin/rm -r classes3; fi
96 if test -e $(LUCENE3_WRAPPER_JAR); then /bin/rm -r $(LUCENE3_WRAPPER_JAR); fi
Note: See TracBrowser for help on using the repository browser.