1 #-------------------------------------------------------------------------
3 # Makefile for src/backend/snowball
7 #-------------------------------------------------------------------------
9 subdir
= src
/backend
/snowball
10 top_builddir
= ..
/..
/..
11 include $(top_builddir
)/src
/Makefile.global
13 override CPPFLAGS
:= -I
$(top_srcdir
)/src
/include/snowball \
14 -I
$(top_srcdir
)/src
/include/snowball
/libstemmer
$(CPPFLAGS
)
16 OBJS
= dict_snowball.o api.o utilities.o \
17 stem_ISO_8859_1_danish.o \
18 stem_ISO_8859_1_dutch.o \
19 stem_ISO_8859_1_english.o \
20 stem_ISO_8859_1_finnish.o \
21 stem_ISO_8859_1_french.o \
22 stem_ISO_8859_1_german.o \
23 stem_ISO_8859_1_hungarian.o \
24 stem_ISO_8859_1_italian.o \
25 stem_ISO_8859_1_norwegian.o \
26 stem_ISO_8859_1_porter.o \
27 stem_ISO_8859_1_portuguese.o \
28 stem_ISO_8859_1_spanish.o \
29 stem_ISO_8859_1_swedish.o \
30 stem_ISO_8859_2_romanian.o \
31 stem_KOI8_R_russian.o \
34 stem_UTF_8_english.o \
35 stem_UTF_8_finnish.o \
38 stem_UTF_8_hungarian.o \
39 stem_UTF_8_italian.o \
40 stem_UTF_8_norwegian.o \
42 stem_UTF_8_portuguese.o \
43 stem_UTF_8_romanian.o \
44 stem_UTF_8_russian.o \
45 stem_UTF_8_spanish.o \
46 stem_UTF_8_swedish.o \
49 # first column is language name and also name of dictionary for not-all-ASCII
50 # words, second is name of dictionary for all-ASCII words
51 # Note order dependency: use of some other language as ASCII dictionary
52 # must come after creation of that language
63 portuguese portuguese \
71 SQLSCRIPT
= snowball_create.sql
75 override VPATH
:= $(srcdir)/libstemmer
:$(VPATH
)
77 VPATH
= $(srcdir)/libstemmer
83 all: all-shared-lib
$(SQLSCRIPT
)
85 include $(top_srcdir
)/src
/Makefile.shlib
87 $(SQLSCRIPT
): Makefile snowball_func.sql.in snowball.sql.in
88 ifeq ($(enable_shared
), yes
)
89 echo
'-- Language-specific snowball dictionaries' > $@
90 cat
$(srcdir)/snowball_func.sql.in
>> $@
93 while
[ "$$#" -gt
0 ] ; \
96 nonascdictname
=$$lang; \
97 ascdictname
=$$1; shift
; \
98 if
[ -s
$(srcdir)/stopwords
/$${lang}.stop
] ; then \
99 stop
=", StopWords=$${lang}" ; \
103 cat
$(srcdir)/snowball.sql.in | \
104 sed
-e
"s#_LANGNAME_#$$lang#g" | \
105 sed
-e
"s#_DICTNAME_#$${lang}_stem#g" | \
106 sed
-e
"s#_CFGNAME_#$$lang#g" | \
107 sed
-e
"s#_ASCDICTNAME_#$${ascdictname}_stem#g" | \
108 sed
-e
"s#_NONASCDICTNAME_#$${nonascdictname}_stem#g" | \
109 sed
-e
"s#_STOPWORDS_#$$stop#g" ; \
112 echo
"-- No language-specific snowball dictionaries, for lack of shared library support" > $@
115 install: all installdirs install-lib
116 $(INSTALL_DATA
) $(SQLSCRIPT
) '$(DESTDIR)$(datadir)'
119 while
[ "$$#" -gt
0 ] ; \
121 lang
=$$1; shift
; shift
; \
122 if
[ -s
$(srcdir)/stopwords
/$${lang}.stop
] ; then \
123 $(INSTALL_DATA
) $(srcdir)/stopwords
/$${lang}.stop
'$(DESTDIR)$(datadir)/$(DICTDIR)' ; \
127 installdirs: installdirs-lib
128 $(mkinstalldirs
) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'
130 uninstall: uninstall-lib
131 rm -f
'$(DESTDIR)$(datadir)/$(SQLSCRIPT)'
134 while
[ "$$#" -gt
0 ] ; \
136 lang
=$$1; shift
; shift
; \
137 if
[ -s
$(srcdir)/stopwords
/$${lang}.stop
] ; then \
138 rm -f
'$(DESTDIR)$(datadir)/$(DICTDIR)/'$${lang}.stop
; \
142 clean distclean maintainer-clean
: clean-lib
143 rm -f
$(OBJS
) $(SQLSCRIPT
)