Last change
on this file since 19583 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
|
Rev | Line | |
---|
[16709] | 1 | JAVAC = $(JAVA_HOME)/bin/javac
|
---|
| 2 | JAR = $(JAVA_HOME)/bin/jar
|
---|
| 3 |
|
---|
[16412] | 4 | LUCENE_JAR = ./lib/lucene-core-2.3.2.jar
|
---|
[13685] | 5 |
|
---|
| 6 |
|
---|
[18813] | 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 \
|
---|
[13685] | 15 |
|
---|
[18813] | 16 | LUCENE_WRAPPER_JAR = LuceneWrapper.jar
|
---|
[13685] | 17 |
|
---|
| 18 |
|
---|
[18813] | 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 |
|
---|
[13685] | 30 | clean:
|
---|
[18813] | 31 | /bin/rm -f $(LUCENE_WRAPPER_OBJECTS) $(LUCENE_WRAPPER_JAR)
|
---|
[13702] | 32 |
|
---|
| 33 | distclean: clean
|
---|
[13803] | 34 | if test -e classes; then /bin/rm -r classes; fi
|
---|
[18813] | 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.