Last change
on this file since 18813 was 18813, checked in by mdewsnip, 15 years ago |
Improved LuceneWrapper Makefile to avoid recompiling all the Java files and generating the LuceneWrapper.jar file each time.
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.1 KB
|
Line | |
---|
1 | JAVAC = $(JAVA_HOME)/bin/javac
|
---|
2 | JAR = $(JAVA_HOME)/bin/jar
|
---|
3 |
|
---|
4 | LUCENE_JAR = ./lib/lucene-core-2.3.2.jar
|
---|
5 |
|
---|
6 |
|
---|
7 | LUCENE_WRAPPER_OBJECTS = \
|
---|
8 | classes/org/greenstone/LuceneWrapper/GS2Analyzer.class \
|
---|
9 | classes/org/greenstone/LuceneWrapper/GS2IndexModifier.class \
|
---|
10 | classes/org/greenstone/LuceneWrapper/GS2LuceneDelete.class \
|
---|
11 | classes/org/greenstone/LuceneWrapper/GS2LuceneEditor.class \
|
---|
12 | classes/org/greenstone/LuceneWrapper/GS2LuceneIndexer.class \
|
---|
13 | classes/org/greenstone/LuceneWrapper/GS2LuceneQuery.class \
|
---|
14 | classes/org/greenstone/LuceneWrapper/LuceneQueryResult.class \
|
---|
15 |
|
---|
16 | LUCENE_WRAPPER_JAR = LuceneWrapper.jar
|
---|
17 |
|
---|
18 |
|
---|
19 | classes/%.class: src/%.java
|
---|
20 | mkdir -p classes && $(JAVAC) -classpath $(LUCENE_JAR):classes:. -d classes -sourcepath src/ src/$*.java
|
---|
21 |
|
---|
22 | LuceneWrapper.jar: $(LUCENE_WRAPPER_OBJECTS)
|
---|
23 | cd classes && jar xf ../$(LUCENE_JAR)
|
---|
24 | $(JAR) cf $(LUCENE_WRAPPER_JAR) -C classes .
|
---|
25 |
|
---|
26 | all: $(LUCENE_WRAPPER_JAR)
|
---|
27 |
|
---|
28 | install: $(LUCENE_WRAPPER_JAR)
|
---|
29 |
|
---|
30 | clean:
|
---|
31 | /bin/rm -f $(LUCENE_WRAPPER_OBJECTS) $(LUCENE_WRAPPER_JAR)
|
---|
32 |
|
---|
33 | distclean: clean
|
---|
34 | if test -e classes; then /bin/rm -r classes; fi
|
---|
35 | if test -e $(LUCENE_WRAPPER_JAR); then /bin/rm -r $(LUCENE_WRAPPER_JAR); fi
|
---|
Note:
See
TracBrowser
for help on using the repository browser.