~snowball-yiddish-dev/snowball-yiddish/trunk

216 by richard
This module will contain only the code and build system, and documentation
1
# -*- makefile -*-
2
227 by richard
Make each stemming algorithm C source file have a different name. This
3
c_src_dir = src_c
267 by richard
Apply Olivier Bornet's patches - fixes to java packaging and build system.
4
java_src_main_dir = java/org/tartarus/snowball
5
java_src_dir = $(java_src_main_dir)/ext
266 by richard
Some updates to the makefile, add all the country codes as aliases to
6
387 by richard
Add hungarian stemming algorithm.
7
libstemmer_algorithms = danish dutch english finnish french german hungarian \
8
			italian \
469 by richard
Integrate romanian stemmer into build system and libstemmer, and add test
9
			norwegian porter portuguese romanian \
554 by Jason Spashett
Add yiddish stemmer to distribution.
10
			russian spanish swedish turkish yiddish
321 by richard
Fix to build system.
11
328 by richard
Update the libstemmer library so that it allows the character set
12
KOI8_R_algorithms = russian
387 by richard
Add hungarian stemming algorithm.
13
ISO_8859_1_algorithms = danish dutch english finnish french german hungarian \
14
			italian \
329 by richard
Add Latin-1 versions of all the primary algorithms except
15
			norwegian porter portuguese spanish swedish
469 by richard
Integrate romanian stemmer into build system and libstemmer, and add test
16
ISO_8859_2_algorithms = romanian
328 by richard
Update the libstemmer library so that it allows the character set
17
463 by richard
Remove lingering references to romanian[12] algorithms which Martin has
18
other_algorithms = german2 kraaij_pohlmann lovins
321 by richard
Fix to build system.
19
390 by richard
Add hungarian to the list of algorithms used in libstemmer, and fix build
20
all_algorithms = $(libstemmer_algorithms) $(other_algorithms)
321 by richard
Fix to build system.
21
216 by richard
This module will contain only the code and build system, and documentation
22
COMPILER_SOURCES = compiler/space.c \
23
		   compiler/tokeniser.c \
24
		   compiler/analyser.c \
25
		   compiler/generator.c \
26
		   compiler/driver.c \
27
		   compiler/generator_java.c
28
COMPILER_HEADERS = compiler/header.h \
426 by richard
Rename syswords and syswords2 to syswords.h and syswords2.h, since they're
29
		   compiler/syswords.h \
30
		   compiler/syswords2.h
216 by richard
This module will contain only the code and build system, and documentation
31
32
RUNTIME_SOURCES  = runtime/api.c \
33
		   runtime/utilities.c
34
RUNTIME_HEADERS  = runtime/api.h \
35
		   runtime/header.h
36
266 by richard
Some updates to the makefile, add all the country codes as aliases to
37
JAVARUNTIME_SOURCES = java/org/tartarus/snowball/Among.java \
267 by richard
Apply Olivier Bornet's patches - fixes to java packaging and build system.
38
		      java/org/tartarus/snowball/SnowballProgram.java \
502 by richard
Improvements to the Java output and support files from Sebastiano Vigna.
39
		      java/org/tartarus/snowball/SnowballStemmer.java \
267 by richard
Apply Olivier Bornet's patches - fixes to java packaging and build system.
40
		      java/org/tartarus/snowball/TestApp.java
266 by richard
Some updates to the makefile, add all the country codes as aliases to
41
230 by richard
Add support for making a source distribution.
42
LIBSTEMMER_SOURCES = libstemmer/libstemmer.c
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
43
LIBSTEMMER_UTF8_SOURCES = libstemmer/libstemmer_utf8.c
44
LIBSTEMMER_HEADERS = include/libstemmer.h libstemmer/modules.h libstemmer/modules_utf8.h
522 by richard
Add libstemmer/libstemmer_c.in to distribution
45
LIBSTEMMER_EXTRA = libstemmer/modules.txt libstemmer/modules_utf8.txt libstemmer/libstemmer_c.in
216 by richard
This module will contain only the code and build system, and documentation
46
47
STEMWORDS_SOURCES = examples/stemwords.c
48
393 by richard
Change link to CVS to a link to SVN (oops), and fix inclusion of all .sbl
49
ALL_ALGORITHM_FILES = $(all_algorithms:%=algorithms/%/stem*.sbl)
349 by richard
Build all algorithms, even if they're not included in libstemmer, because
50
C_LIB_SOURCES = $(libstemmer_algorithms:%=$(c_src_dir)/stem_UTF_8_%.c) \
51
		$(KOI8_R_algorithms:%=$(c_src_dir)/stem_KOI8_R_%.c) \
469 by richard
Integrate romanian stemmer into build system and libstemmer, and add test
52
		$(ISO_8859_1_algorithms:%=$(c_src_dir)/stem_ISO_8859_1_%.c) \
53
		$(ISO_8859_2_algorithms:%=$(c_src_dir)/stem_ISO_8859_2_%.c)
349 by richard
Build all algorithms, even if they're not included in libstemmer, because
54
C_LIB_HEADERS = $(libstemmer_algorithms:%=$(c_src_dir)/stem_UTF_8_%.h) \
55
		$(KOI8_R_algorithms:%=$(c_src_dir)/stem_KOI8_R_%.h) \
469 by richard
Integrate romanian stemmer into build system and libstemmer, and add test
56
		$(ISO_8859_1_algorithms:%=$(c_src_dir)/stem_ISO_8859_1_%.h) \
57
		$(ISO_8859_2_algorithms:%=$(c_src_dir)/stem_ISO_8859_2_%.h)
349 by richard
Build all algorithms, even if they're not included in libstemmer, because
58
C_OTHER_SOURCES = $(other_algorithms:%=$(c_src_dir)/stem_UTF_8_%.c)
59
C_OTHER_HEADERS = $(other_algorithms:%=$(c_src_dir)/stem_UTF_8_%.h)
321 by richard
Fix to build system.
60
JAVA_SOURCES = $(libstemmer_algorithms:%=$(java_src_dir)/%Stemmer.java)
230 by richard
Add support for making a source distribution.
61
216 by richard
This module will contain only the code and build system, and documentation
62
COMPILER_OBJECTS=$(COMPILER_SOURCES:.c=.o)
63
RUNTIME_OBJECTS=$(RUNTIME_SOURCES:.c=.o)
64
LIBSTEMMER_OBJECTS=$(LIBSTEMMER_SOURCES:.c=.o)
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
65
LIBSTEMMER_UTF8_OBJECTS=$(LIBSTEMMER_UTF8_SOURCES:.c=.o)
216 by richard
This module will contain only the code and build system, and documentation
66
STEMWORDS_OBJECTS=$(STEMWORDS_SOURCES:.c=.o)
349 by richard
Build all algorithms, even if they're not included in libstemmer, because
67
C_LIB_OBJECTS = $(C_LIB_SOURCES:.c=.o)
68
C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o)
266 by richard
Some updates to the makefile, add all the country codes as aliases to
69
JAVA_CLASSES = $(JAVA_SOURCES:.java=.class)
70
JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURCES:.java=.class)
216 by richard
This module will contain only the code and build system, and documentation
71
408 by richard
Change CFLAGS to use -O2, and also change explicit -O4 option to -O2.
72
CFLAGS=-Iinclude -O2
293 by richard
Drop -Werror, since it is causing some problems for the build on ixion., (I
73
CPPFLAGS=-W -Wall -Wmissing-prototypes -Wmissing-declarations
216 by richard
This module will contain only the code and build system, and documentation
74
390 by richard
Add hungarian to the list of algorithms used in libstemmer, and fix build
75
all: snowball libstemmer.o stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
216 by richard
This module will contain only the code and build system, and documentation
76
77
clean:
227 by richard
Make each stemming algorithm C source file have a different name. This
78
	rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
79
	      $(LIBSTEMMER_OBJECTS) $(LIBSTEMMER_UTF8_OBJECTS) $(STEMWORDS_OBJECTS) snowball \
80
	      libstemmer.o stemwords \
81
              libstemmer/modules.h \
82
              libstemmer/modules_utf8.h \
83
              snowball.splint \
349 by richard
Build all algorithms, even if they're not included in libstemmer, because
84
	      $(C_LIB_SOURCES) $(C_LIB_HEADERS) $(C_LIB_OBJECTS) \
85
	      $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS) \
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
86
	      $(JAVA_SOURCES) $(JAVA_CLASSES) $(JAVA_RUNTIME_CLASSES) \
87
              libstemmer/mkinc.mak libstemmer/mkinc_utf8.mak \
88
              libstemmer/libstemmer.c libstemmer/libstemmer_utf8.c
230 by richard
Add support for making a source distribution.
89
	rm -rf dist
337 by richard
Move the definition of which algorithms to use into a separate
90
	rmdir $(c_src_dir) || true
216 by richard
This module will contain only the code and build system, and documentation
91
92
snowball: $(COMPILER_OBJECTS)
93
	$(CC) -o $@ $^
94
444 by richard
Patch from Olly:
95
$(COMPILER_OBJECTS): $(COMPILER_HEADERS)
96
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
97
libstemmer/libstemmer.c: libstemmer/libstemmer_c.in
418 by richard
Patch from Olly Betts:
98
	sed 's/@MODULES_H@/modules.h/' $^ >$@
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
99
100
libstemmer/libstemmer_utf8.c: libstemmer/libstemmer_c.in
418 by richard
Patch from Olly Betts:
101
	sed 's/@MODULES_H@/modules_utf8.h/' $^ >$@
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
102
103
libstemmer/modules.h libstemmer/mkinc.mak: libstemmer/mkmodules.pl libstemmer/modules.txt
104
	libstemmer/mkmodules.pl $@ $(c_src_dir) libstemmer/modules.txt libstemmer/mkinc.mak
105
106
libstemmer/modules_utf8.h libstemmer/mkinc_utf8.mak: libstemmer/mkmodules.pl libstemmer/modules_utf8.txt
107
	libstemmer/mkmodules.pl $@ $(c_src_dir) libstemmer/modules_utf8.txt libstemmer/mkinc_utf8.mak utf8
227 by richard
Make each stemming algorithm C source file have a different name. This
108
349 by richard
Build all algorithms, even if they're not included in libstemmer, because
109
libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
227 by richard
Make each stemming algorithm C source file have a different name. This
110
349 by richard
Build all algorithms, even if they're not included in libstemmer, because
111
libstemmer.o: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
216 by richard
This module will contain only the code and build system, and documentation
112
	$(AR) -cru $@ $^
113
114
stemwords: $(STEMWORDS_OBJECTS) libstemmer.o
115
	$(CC) -o $@ $^
116
401 by richard
Changes to build system to match change from - to _.
117
algorithms/%/stem_Unicode.sbl: algorithms/%/stem_ISO_8859_1.sbl
329 by richard
Add Latin-1 versions of all the primary algorithms except
118
	cp $^ $@
119
401 by richard
Changes to build system to match change from - to _.
120
$(c_src_dir)/stem_UTF_8_%.c $(c_src_dir)/stem_UTF_8_%.h: algorithms/%/stem_Unicode.sbl snowball
329 by richard
Add Latin-1 versions of all the primary algorithms except
121
	@mkdir -p $(c_src_dir)
401 by richard
Changes to build system to match change from - to _.
122
	@l=`echo "$<" | sed 's!\(.*\)/stem_Unicode.sbl$$!\1!;s!^.*/!!'`; \
329 by richard
Add Latin-1 versions of all the primary algorithms except
123
	o="$(c_src_dir)/stem_UTF_8_$${l}"; \
124
	echo "./snowball $< -o $${o} -eprefix $${l}_UTF_8_ -r ../runtime -u"; \
125
	./snowball $< -o $${o} -eprefix $${l}_UTF_8_ -r ../runtime -u
328 by richard
Update the libstemmer library so that it allows the character set
126
401 by richard
Changes to build system to match change from - to _.
127
$(c_src_dir)/stem_KOI8_R_%.c $(c_src_dir)/stem_KOI8_R_%.h: algorithms/%/stem_KOI8_R.sbl snowball
328 by richard
Update the libstemmer library so that it allows the character set
128
	@mkdir -p $(c_src_dir)
401 by richard
Changes to build system to match change from - to _.
129
	@l=`echo "$<" | sed 's!\(.*\)/stem_KOI8_R.sbl$$!\1!;s!^.*/!!'`; \
328 by richard
Update the libstemmer library so that it allows the character set
130
	o="$(c_src_dir)/stem_KOI8_R_$${l}"; \
131
	echo "./snowball $< -o $${o} -eprefix $${l}_KOI8_R_ -r ../runtime"; \
132
	./snowball $< -o $${o} -eprefix $${l}_KOI8_R_ -r ../runtime
133
401 by richard
Changes to build system to match change from - to _.
134
$(c_src_dir)/stem_ISO_8859_1_%.c $(c_src_dir)/stem_ISO_8859_1_%.h: algorithms/%/stem_ISO_8859_1.sbl snowball
328 by richard
Update the libstemmer library so that it allows the character set
135
	@mkdir -p $(c_src_dir)
401 by richard
Changes to build system to match change from - to _.
136
	@l=`echo "$<" | sed 's!\(.*\)/stem_ISO_8859_1.sbl$$!\1!;s!^.*/!!'`; \
329 by richard
Add Latin-1 versions of all the primary algorithms except
137
	o="$(c_src_dir)/stem_ISO_8859_1_$${l}"; \
138
	echo "./snowball $< -o $${o} -eprefix $${l}_ISO_8859_1_ -r ../runtime"; \
139
	./snowball $< -o $${o} -eprefix $${l}_ISO_8859_1_ -r ../runtime
216 by richard
This module will contain only the code and build system, and documentation
140
469 by richard
Integrate romanian stemmer into build system and libstemmer, and add test
141
$(c_src_dir)/stem_ISO_8859_2_%.c $(c_src_dir)/stem_ISO_8859_2_%.h: algorithms/%/stem_ISO_8859_2.sbl snowball
142
	@mkdir -p $(c_src_dir)
143
	@l=`echo "$<" | sed 's!\(.*\)/stem_ISO_8859_2.sbl$$!\1!;s!^.*/!!'`; \
144
	o="$(c_src_dir)/stem_ISO_8859_2_$${l}"; \
145
	echo "./snowball $< -o $${o} -eprefix $${l}_ISO_8859_2_ -r ../runtime"; \
146
	./snowball $< -o $${o} -eprefix $${l}_ISO_8859_2_ -r ../runtime
147
227 by richard
Make each stemming algorithm C source file have a different name. This
148
$(c_src_dir)/stem_%.o: $(c_src_dir)/stem_%.c $(c_src_dir)/stem_%.h
408 by richard
Change CFLAGS to use -O2, and also change explicit -O4 option to -O2.
149
	$(CC) $(CFLAGS) -O2 -c -o $@ $< -Wall
216 by richard
This module will contain only the code and build system, and documentation
150
401 by richard
Changes to build system to match change from - to _.
151
$(java_src_dir)/%Stemmer.java: algorithms/%/stem_Unicode.sbl snowball
266 by richard
Some updates to the makefile, add all the country codes as aliases to
152
	@mkdir -p $(java_src_dir)
401 by richard
Changes to build system to match change from - to _.
153
	@l=`echo "$<" | sed 's!\(.*\)/stem_Unicode.sbl$$!\1!;s!^.*/!!'`; \
266 by richard
Some updates to the makefile, add all the country codes as aliases to
154
	o="$(java_src_dir)/$${l}Stemmer"; \
502 by richard
Improvements to the Java output and support files from Sebastiano Vigna.
155
	echo "./snowball $< -j -o $${o} -p \"org.tartarus.snowball.SnowballStemmer\" -eprefix $${l}_ -r ../runtime -n $${l}Stemmer"; \
156
	./snowball $< -j -o $${o} -p "org.tartarus.snowball.SnowballStemmer" -eprefix $${l}_ -r ../runtime -n $${l}Stemmer
266 by richard
Some updates to the makefile, add all the country codes as aliases to
157
216 by richard
This module will contain only the code and build system, and documentation
158
splint: snowball.splint
159
snowball.splint: $(COMPILER_SOURCES)
160
	splint $^ >$@ -weak
230 by richard
Add support for making a source distribution.
161
162
# Make a full source distribution
267 by richard
Apply Olivier Bornet's patches - fixes to java packaging and build system.
163
dist: dist_snowball dist_libstemmer_c dist_libstemmer_java
260 by richard
Add make dist target, which generates a tarball containing all the snowball
164
165
# Make a distribution of all the sources involved in snowball
166
dist_snowball: $(COMPILER_SOURCES) $(COMPILER_HEADERS) \
167
	    $(RUNTIME_SOURCES) $(RUNTIME_HEADERS) \
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
168
	    $(LIBSTEMMER_SOURCES) \
169
	    $(LIBSTEMMER_UTF8_SOURCES) \
170
            $(LIBSTEMMER_HEADERS) \
395 by richard
Add modules.txt to generated tarballs, thanks to Olly Betts for pointing
171
	    $(LIBSTEMMER_EXTRA) \
393 by richard
Change link to CVS to a link to SVN (oops), and fix inclusion of all .sbl
172
	    $(ALL_ALGORITHM_FILES) $(STEMWORDS_SOURCES) \
260 by richard
Add make dist target, which generates a tarball containing all the snowball
173
	    GNUmakefile README doc/TODO libstemmer/mkmodules.pl
289 by richard
Give the tarball containing only the code a more descriptive name.
174
	destname=snowball_code; \
260 by richard
Add make dist target, which generates a tarball containing all the snowball
175
	dest=dist/$${destname}; \
176
	rm -rf $${dest} && \
177
	rm -f $${dest}.tgz && \
178
	for file in $^; do \
179
	  dir=`dirname $$file` && \
180
	  mkdir -p $${dest}/$${dir} && \
393 by richard
Change link to CVS to a link to SVN (oops), and fix inclusion of all .sbl
181
	  cp -a $${file} $${dest}/$${dir} || exit 1 ; \
260 by richard
Add make dist target, which generates a tarball containing all the snowball
182
	done && \
183
	(cd dist && tar zcf $${destname}.tgz $${destname}) && \
184
	rm -rf $${dest}
230 by richard
Add support for making a source distribution.
185
186
# Make a distribution of all the sources required to compile the C library.
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
187
dist_libstemmer_c: \
188
            $(RUNTIME_SOURCES) \
189
            $(RUNTIME_HEADERS) \
190
            $(LIBSTEMMER_SOURCES) \
191
            $(LIBSTEMMER_UTF8_SOURCES) \
192
            $(LIBSTEMMER_HEADERS) \
395 by richard
Add modules.txt to generated tarballs, thanks to Olly Betts for pointing
193
            $(LIBSTEMMER_EXTRA) \
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
194
	    $(C_LIB_SOURCES) \
195
            $(C_LIB_HEADERS) \
196
            libstemmer/mkinc.mak \
197
            libstemmer/mkinc_utf8.mak
260 by richard
Add make dist target, which generates a tarball containing all the snowball
198
	destname=libstemmer_c; \
231 by richard
Make compressed tarballs for dists.
199
	dest=dist/$${destname}; \
230 by richard
Add support for making a source distribution.
200
	rm -rf $${dest} && \
231 by richard
Make compressed tarballs for dists.
201
	rm -f $${dest}.tgz && \
314 by richard
Add a README file to the libstemmer_c tarball.
202
	mkdir -p $${dest} && \
203
	cp -a doc/libstemmer_c_README $${dest}/README && \
204
	mkdir -p $${dest}/examples && \
205
	cp -a examples/stemwords.c $${dest}/examples && \
257 by richard
Update makefile to use new path for libstemmer.h, and to generate a more useful
206
	mkdir -p $${dest}/$(c_src_dir) && \
349 by richard
Build all algorithms, even if they're not included in libstemmer, because
207
	cp -a $(C_LIB_SOURCES) $(C_LIB_HEADERS) $${dest}/$(c_src_dir) && \
230 by richard
Add support for making a source distribution.
208
	mkdir -p $${dest}/runtime && \
209
	cp -a $(RUNTIME_SOURCES) $(RUNTIME_HEADERS) $${dest}/runtime && \
210
	mkdir -p $${dest}/libstemmer && \
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
211
	cp -a $(LIBSTEMMER_SOURCES) $(LIBSTEMMER_UTF8_SOURCES) $(LIBSTEMMER_HEADERS) $(LIBSTEMMER_EXTRA) $${dest}/libstemmer && \
257 by richard
Update makefile to use new path for libstemmer.h, and to generate a more useful
212
	mkdir -p $${dest}/include && \
213
	mv $${dest}/libstemmer/libstemmer.h $${dest}/include && \
214
	(cd $${dest} && \
316 by richard
Add documentation file for Java libstemmer.
215
	 echo "README" >> MANIFEST && \
257 by richard
Update makefile to use new path for libstemmer.h, and to generate a more useful
216
	 ls $(c_src_dir)/*.c $(c_src_dir)/*.h >> MANIFEST && \
217
	 ls runtime/*.c runtime/*.h >> MANIFEST && \
218
	 ls libstemmer/*.c libstemmer/*.h >> MANIFEST && \
409 by richard
Modify libstemmer and build system to make it easy to generate UTF-8 only
219
	 ls include/*.h >> MANIFEST) && \
220
        cp -a libstemmer/mkinc.mak libstemmer/mkinc_utf8.mak $${dest}/ && \
257 by richard
Update makefile to use new path for libstemmer.h, and to generate a more useful
221
	echo 'include mkinc.mak' >> $${dest}/Makefile && \
314 by richard
Add a README file to the libstemmer_c tarball.
222
	echo 'CFLAGS=-Iinclude' >> $${dest}/Makefile && \
223
	echo 'all: libstemmer.o stemwords' >> $${dest}/Makefile && \
257 by richard
Update makefile to use new path for libstemmer.h, and to generate a more useful
224
	echo 'libstemmer.o: $$(snowball_sources:.c=.o)' >> $${dest}/Makefile && \
225
	echo '	$$(AR) -cru $$@ $$^' >> $${dest}/Makefile && \
314 by richard
Add a README file to the libstemmer_c tarball.
226
	echo 'stemwords: examples/stemwords.o libstemmer.o' >> $${dest}/Makefile && \
227
	echo '	$$(CC) -o $$@ $$^' >> $${dest}/Makefile && \
257 by richard
Update makefile to use new path for libstemmer.h, and to generate a more useful
228
	echo 'clean:' >> $${dest}/Makefile && \
314 by richard
Add a README file to the libstemmer_c tarball.
229
	echo '	rm -f stemwords *.o $(c_src_dir)/*.o runtime/*.o libstemmer/*.o' >> $${dest}/Makefile && \
231 by richard
Make compressed tarballs for dists.
230
	(cd dist && tar zcf $${destname}.tgz $${destname}) && \
231
	rm -rf $${dest}
230 by richard
Add support for making a source distribution.
232
266 by richard
Some updates to the makefile, add all the country codes as aliases to
233
# Make a distribution of all the sources required to compile the Java library.
234
dist_libstemmer_java: $(RUNTIME_SOURCES) $(RUNTIME_HEADERS) \
395 by richard
Add modules.txt to generated tarballs, thanks to Olly Betts for pointing
235
            $(LIBSTEMMER_EXTRA) \
266 by richard
Some updates to the makefile, add all the country codes as aliases to
236
	    $(JAVA_SOURCES)
237
	destname=libstemmer_java; \
238
	dest=dist/$${destname}; \
239
	rm -rf $${dest} && \
240
	rm -f $${dest}.tgz && \
316 by richard
Add documentation file for Java libstemmer.
241
	mkdir -p $${dest} && \
242
	cp -a doc/libstemmer_java_README $${dest}/README && \
266 by richard
Some updates to the makefile, add all the country codes as aliases to
243
	mkdir -p $${dest}/$(java_src_dir) && \
244
	cp -a $(JAVA_SOURCES) $${dest}/$(java_src_dir) && \
267 by richard
Apply Olivier Bornet's patches - fixes to java packaging and build system.
245
	mkdir -p $${dest}/$(java_src_main_dir) && \
246
	cp -a $(JAVARUNTIME_SOURCES) $${dest}/$(java_src_main_dir) && \
266 by richard
Some updates to the makefile, add all the country codes as aliases to
247
	(cd $${dest} && \
316 by richard
Add documentation file for Java libstemmer.
248
	 echo "README" >> MANIFEST && \
267 by richard
Apply Olivier Bornet's patches - fixes to java packaging and build system.
249
	 ls $(java_src_dir)/*.java >> MANIFEST && \
250
	 ls $(java_src_main_dir)/*.java >> MANIFEST) && \
266 by richard
Some updates to the makefile, add all the country codes as aliases to
251
	(cd dist && tar zcf $${destname}.tgz $${destname}) && \
252
	rm -rf $${dest}
432 by richard
Patch from Olly Betts to add make check targets. Also converts the sample
253
469 by richard
Integrate romanian stemmer into build system and libstemmer, and add test
254
check: check_utf8 check_iso_8859_1 check_iso_8859_2 check_koi8r
433 by richard
Patch from Olly - check KOI8R stemmers too.
255
256
check_utf8: $(libstemmer_algorithms:%=check_utf8_%)
432 by richard
Patch from Olly Betts to add make check targets. Also converts the sample
257
469 by richard
Integrate romanian stemmer into build system and libstemmer, and add test
258
check_iso_8859_1: $(ISO_8859_1_algorithms:%=check_iso_8859_1_%)
259
260
check_iso_8859_2: $(ISO_8859_2_algorithms:%=check_iso_8859_2_%)
432 by richard
Patch from Olly Betts to add make check targets. Also converts the sample
261
433 by richard
Patch from Olly - check KOI8R stemmers too.
262
check_koi8r: $(KOI8_R_algorithms:%=check_koi8r_%)
263
434 by richard
Make "check" targets depend on stemwords, so I can just run "make clean check".
264
check_utf8_%: ../data/% stemwords
457 by richard
Check that the generated diffs.txt match those in the output, as well as the
265
	@echo "Checking output of `echo $<|sed 's!.*/!!'` stemmer with UTF-8"
266
	@./stemwords -c UTF_8 -l `echo $<|sed 's!.*/!!'` -i $</voc.txt -o tmp.txt
267
	@diff -u $</output.txt tmp.txt
268
	@if [ -e $</diffs.txt ] ; \
269
	then \
270
	  ./stemwords -c UTF_8 -l `echo $<|sed 's!.*/!!'` -i $</voc.txt -o tmp.txt -p2 && \
271
	  diff -u $</diffs.txt tmp.txt; \
272
	fi
273
	@rm tmp.txt
432 by richard
Patch from Olly Betts to add make check targets. Also converts the sample
274
469 by richard
Integrate romanian stemmer into build system and libstemmer, and add test
275
check_iso_8859_1_%: ../data/% stemwords
276
	@echo "Checking output of `echo $<|sed 's!.*/!!'` stemmer with ISO_8859_1"
457 by richard
Check that the generated diffs.txt match those in the output, as well as the
277
	@iconv -fUTF8 -tISO8859-1 $</voc.txt|./stemwords -c ISO_8859_1 -l `echo $<|sed 's!.*/!!'` -o tmp.txt
278
	@iconv -fUTF8 -tISO8859-1 $</output.txt|diff -u - tmp.txt
279
	@rm tmp.txt
432 by richard
Patch from Olly Betts to add make check targets. Also converts the sample
280
469 by richard
Integrate romanian stemmer into build system and libstemmer, and add test
281
check_iso_8859_2_%: ../data/% stemwords
282
	@echo "Checking output of `echo $<|sed 's!.*/!!'` stemmer with ISO_8859_2"
283
	@iconv -fUTF8 -tISO8859-2 $</voc.txt|./stemwords -c ISO_8859_2 -l `echo $<|sed 's!.*/!!'` -o tmp.txt
284
	@iconv -fUTF8 -tISO8859-2 $</output.txt|diff -u - tmp.txt
285
	@rm tmp.txt
286
434 by richard
Make "check" targets depend on stemwords, so I can just run "make clean check".
287
check_koi8r_%: ../data/% stemwords
457 by richard
Check that the generated diffs.txt match those in the output, as well as the
288
	@echo "Checking output of `echo $<|sed 's!.*/!!'` stemmer with KOI8R"
289
	@iconv -fUTF8 -tKOI8R $</voc.txt|./stemwords -c KOI8_R -l `echo $<|sed 's!.*/!!'` -o tmp.txt
290
	@iconv -fUTF8 -tKOI8R $</output.txt|diff -u - tmp.txt
291
	@rm tmp.txt