head	1.8;
access;
symbols
	REL9_0_0:1.8
	REL9_1_ALPHA1:1.8
	REL9_0_RC1:1.8
	REL9_0_BETA4:1.8
	REL9_0_STABLE:1.8.0.10
	REL9_0_BETA3:1.8
	REL9_0_BETA2:1.8
	REL8_3_11:1.4
	REL8_4_4:1.6
	REL9_0_BETA1:1.8
	REL9_0_ALPHA5_BRANCH:1.8.0.8
	REL9_0_ALPHA5:1.8
	REL8_3_10:1.4
	REL8_4_3:1.6
	REL9_0_ALPHA4:1.8
	REL9_0_ALPHA4_BRANCH:1.8.0.6
	REL8_5_ALPHA3:1.8
	REL8_5_ALPHA3_BRANCH:1.8.0.4
	REL8_3_9:1.4
	REL8_4_2:1.6
	REL8_5_ALPHA2:1.8
	REL8_5_ALPHA2_BRANCH:1.8.0.2
	REL8_3_8:1.4
	REL8_4_1:1.6
	REL8_5_ALPHA1:1.6
	REL8_5_ALPHA1_BRANCH:1.6.0.4
	REL8_4_STABLE:1.6.0.2
	REL8_4_0:1.6
	REL8_4_RC2:1.6
	REL8_4_RC1:1.6
	REL8_4_BETA2:1.6
	REL8_4_BETA1:1.6
	REL8_3_7:1.4
	REL8_3_6:1.4
	REL8_3_5:1.4
	REL8_3_4:1.4
	REL8_3_3:1.4
	REL8_3_2:1.4
	REL8_3_1:1.4
	REL8_3_STABLE:1.4.0.2
	REL8_3_0:1.4
	REL8_3_RC2:1.4
	REL8_3_RC1:1.4
	REL8_3_BETA4:1.4
	REL8_3_BETA3:1.4
	REL8_3_BETA2:1.4
	REL8_3_BETA1:1.3;
locks; strict;
comment	@# @;


1.8
date	2009.08.28.20.26.19;	author petere;	state Exp;
branches;
next	1.7;

1.7
date	2009.08.26.22.24.43;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	2008.04.07.14.15.58;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2008.03.18.16.24.50;	author petere;	state Exp;
branches;
next	1.4;

1.4
date	2007.10.23.20.46.12;	author tgl;	state Exp;
branches;
next	1.3;

1.3
date	2007.08.27.10.29.49;	author mha;	state Exp;
branches;
next	1.2;

1.2
date	2007.08.25.01.06.24;	author tgl;	state Exp;
branches;
next	1.1;

1.1
date	2007.08.21.01.11.15;	author tgl;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Derived files that are shipped in the distribution used to be built in the
source directory even for out-of-tree builds.  They are now alsl built in
the build tree.  This should be more convenient for certain developers'
workflows, and shouldn't really break anything else.
@
text
@#-------------------------------------------------------------------------
#
# Makefile for src/backend/snowball
#
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.7 2009/08/26 22:24:43 petere Exp $
#
#-------------------------------------------------------------------------

subdir = src/backend/snowball
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global

override CPPFLAGS := -I$(top_srcdir)/src/include/snowball \
	-I$(top_srcdir)/src/include/snowball/libstemmer $(CPPFLAGS)

OBJS= dict_snowball.o api.o utilities.o \
	stem_ISO_8859_1_danish.o \
	stem_ISO_8859_1_dutch.o \
	stem_ISO_8859_1_english.o \
	stem_ISO_8859_1_finnish.o \
	stem_ISO_8859_1_french.o \
	stem_ISO_8859_1_german.o \
	stem_ISO_8859_1_hungarian.o \
	stem_ISO_8859_1_italian.o \
	stem_ISO_8859_1_norwegian.o \
	stem_ISO_8859_1_porter.o \
	stem_ISO_8859_1_portuguese.o \
	stem_ISO_8859_1_spanish.o \
	stem_ISO_8859_1_swedish.o \
	stem_ISO_8859_2_romanian.o \
	stem_KOI8_R_russian.o \
	stem_UTF_8_danish.o \
	stem_UTF_8_dutch.o \
	stem_UTF_8_english.o \
	stem_UTF_8_finnish.o \
	stem_UTF_8_french.o \
	stem_UTF_8_german.o \
	stem_UTF_8_hungarian.o \
	stem_UTF_8_italian.o \
	stem_UTF_8_norwegian.o \
	stem_UTF_8_porter.o \
	stem_UTF_8_portuguese.o \
	stem_UTF_8_romanian.o \
	stem_UTF_8_russian.o \
	stem_UTF_8_spanish.o \
	stem_UTF_8_swedish.o \
	stem_UTF_8_turkish.o

# first column is language name and also name of dictionary for not-all-ASCII
# words, second is name of dictionary for all-ASCII words
# Note order dependency: use of some other language as ASCII dictionary
# must come after creation of that language
LANGUAGES=  \
	danish		danish 		\
	dutch 		dutch 		\
	english 	english		\
	finnish 	finnish		\
	french 		french		\
	german 		german		\
	hungarian 	hungarian	\
	italian 	italian		\
	norwegian 	norwegian	\
	portuguese 	portuguese	\
	romanian 	romanian	\
	russian 	english		\
	spanish 	spanish		\
	swedish 	swedish		\
	turkish		turkish


SQLSCRIPT= snowball_create.sql
DICTDIR=tsearch_data

VPATH += $(srcdir)/libstemmer

NAME := dict_snowball
rpath =

all: all-shared-lib $(SQLSCRIPT)

include $(top_srcdir)/src/Makefile.shlib

$(SQLSCRIPT): Makefile snowball_func.sql.in snowball.sql.in
ifeq ($(enable_shared), yes)
	echo '-- Language-specific snowball dictionaries' > $@@
	cat $(srcdir)/snowball_func.sql.in >> $@@	
	@@set -e; \
	set $(LANGUAGES) ; \
	while [ "$$#" -gt 0 ] ; \
	do \
		lang=$$1; shift; \
		nonascdictname=$$lang; \
		ascdictname=$$1; shift; \
		if [ -s $(srcdir)/stopwords/$${lang}.stop ] ; then \
			stop=", StopWords=$${lang}" ; \
		else \
			stop=""; \
		fi; \
		cat $(srcdir)/snowball.sql.in | \
			sed -e "s#_LANGNAME_#$$lang#g" | \
			sed -e "s#_DICTNAME_#$${lang}_stem#g" | \
			sed -e "s#_CFGNAME_#$$lang#g" | \
			sed -e "s#_ASCDICTNAME_#$${ascdictname}_stem#g" | \
			sed -e "s#_NONASCDICTNAME_#$${nonascdictname}_stem#g" | \
			sed -e "s#_STOPWORDS_#$$stop#g" ; \
	done >> $@@
else
	echo "-- No language-specific snowball dictionaries, for lack of shared library support" > $@@
endif

install: all installdirs install-lib
	$(INSTALL_DATA) $(SQLSCRIPT) '$(DESTDIR)$(datadir)'
	@@set -e; \
	set $(LANGUAGES) ; \
	while [ "$$#" -gt 0 ] ; \
	do \
		lang=$$1; shift; shift; \
		if [ -s $(srcdir)/stopwords/$${lang}.stop ] ; then \
			$(INSTALL_DATA) $(srcdir)/stopwords/$${lang}.stop '$(DESTDIR)$(datadir)/$(DICTDIR)' ; \
		fi \
	done

installdirs: installdirs-lib
	$(MKDIR_P) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'

uninstall: uninstall-lib
	rm -f '$(DESTDIR)$(datadir)/$(SQLSCRIPT)'
	@@set -e; \
	set $(LANGUAGES) ; \
	while [ "$$#" -gt 0 ] ; \
	do \
		lang=$$1; shift; shift;  \
		if [ -s $(srcdir)/stopwords/$${lang}.stop ] ; then \
		    rm -f '$(DESTDIR)$(datadir)/$(DICTDIR)/'$${lang}.stop ; \
		fi \
	done

clean distclean maintainer-clean: clean-lib
	rm -f $(OBJS) $(SQLSCRIPT)
@


1.7
log
@Update of install-sh, mkinstalldirs, and associated configury

Update install-sh to that from Autoconf 2.63, plus our Darwin-specific
changes (which I simplified a bit).  install-sh is now able to install
multiple files in one run, so we could simplify our makefiles sometime.

install-sh also now has a -d option to create directories, so we don't need
mkinstalldirs anymore.

Use AC_PROG_MKDIR_P in configure.in, so we can use mkdir -p when available
instead of install-sh -d.  For consistency with the rest of the world,
the corresponding make variable has been renamed from $(mkinstalldirs) to
$(MKDIR_P).
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.6 2008/04/07 14:15:58 petere Exp $
d74 1
a74 5
ifdef VPATH
override VPATH := $(srcdir)/libstemmer:$(VPATH)
else
VPATH = $(srcdir)/libstemmer
endif
@


1.6
log
@Implement a few changes to how shared libraries and dynamically loadable
modules are built.  Foremost, it creates a solid distinction between these two
types of targets based on what had already been implemented and duplicated in
ad hoc ways before.  Specifically,

- Dynamically loadable modules no longer get a soname.  The numbers previously
set in the makefiles were dummy numbers anyway, and the presence of a soname
upset a few packaging tools, so it is nicer not to have one.

- The cumbersome detour taken on installation (build a libfoo.so.0.0.0 and
then override the rule to install foo.so instead) is removed.

- Lots of duplicated code simplified.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.5 2008/03/18 16:24:50 petere Exp $
d128 1
a128 1
	$(mkinstalldirs) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'
@


1.5
log
@Catch all errors in for and while loops in makefiles.  Don't ignore any
errors in any commands, including in various clean targets that have so far
been handled inconsistently.  make -i is available to ignore all errors in
a consistent and official way.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.4 2007/10/23 20:46:12 tgl Exp $
a79 2
SHLIB_LINK 	:= $(BE_DLLLIBS)

a80 2
SO_MAJOR_VERSION := 0
SO_MINOR_VERSION := 0
d115 1
a115 4
install: all installdirs
ifeq ($(enable_shared), yes)
	$(INSTALL_SHLIB) $(shlib) '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
endif
d127 2
a128 2
installdirs:
	$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)' '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'
d130 1
a130 2
uninstall:
	rm -f '$(DESTDIR)$(pkglibdir)/$(NAME)$(DLSUFFIX)'
@


1.4
log
@Rename and slightly redefine the default text search parser's "word"
categories, as per discussion.  asciiword (formerly lword) is still
ASCII-letters-only, and numword (formerly word) is still the most general
mixed-alpha-and-digits case.  But word (formerly nlword) is now
any-group-of-letters-with-at-least-one-non-ASCII, rather than all-non-ASCII as
before.  This is no worse than before for parsing mixed Russian/English text,
which seems to have been the design center for the original coding; and it
should simplify matters for parsing most European languages.  In particular
it will not be necessary for any language to accept strings containing digits
as being regular "words".  The hyphenated-word categories are adjusted
similarly.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.3 2007/08/27 10:29:49 mha Exp $
d95 2
a96 1
	@@set $(LANGUAGES) ; \
d124 2
a125 1
	@@set $(LANGUAGES) ; \
d140 2
a141 1
	@@set $(LANGUAGES) ; \
@


1.3
log
@Fix generation of snowball_create.sql on msvc builds.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.2 2007/08/25 01:06:24 tgl Exp $
d49 3
a51 2
# second column is name of latin dictionary, if different
# Note order dependency: use of some other language as latin dictionary
d99 2
a100 2
		nonlatdictname=$$lang; \
		latdictname=$$1; shift; \
d110 2
a111 2
			sed -e "s#_LATDICTNAME_#$${latdictname}_stem#g" | \
			sed -e "s#_NONLATDICTNAME_#$${nonlatdictname}_stem#g" | \
@


1.2
log
@Rename built-in Snowball stemmer dictionaries to be english_stem,
russian_stem, etc.  Per discussion.
@
text
@d5 1
a5 1
# $PostgreSQL: pgsql/src/backend/snowball/Makefile,v 1.1 2007/08/21 01:11:15 tgl Exp $
d67 1
a67 1
	turkish		turkish		\
@


1.1
log
@Tsearch2 functionality migrates to core.  The bulk of this work is by
Oleg Bartunov and Teodor Sigaev, but I did a lot of editorializing,
so anything that's broken is probably my fault.

Documentation is nonexistent as yet, but let's land the patch so we can
get some portability testing done.
@
text
@d5 1
a5 1
# $PostgreSQL$
d50 2
d98 2
a104 2
		nonlatdictname=$$lang; \
		latdictname=$$1; shift; \
d106 2
a107 1
			sed -e "s#_DICTNAME_#$$lang#g" | \
d109 2
a110 2
			sed -e "s#_LATDICTNAME_#$$latdictname#g" | \
			sed -e "s#_NONLATDICTNAME_#$$nonlatdictname#g" | \
@

