]> granicus.if.org Git - postgresql/blob - contrib/tsearch2/Makefile
Reduce WAL activity for page splits:
[postgresql] / contrib / tsearch2 / Makefile
1 # $PostgreSQL: pgsql/contrib/tsearch2/Makefile,v 1.17 2006/09/11 15:14:46 tgl Exp $
2
3 MODULE_big = tsearch2
4 OBJS = dict_ex.o dict.o snmap.o stopword.o common.o prs_dcfg.o \
5        dict_snowball.o dict_ispell.o dict_syn.o dict_thesaurus.o \
6        wparser.o wparser_def.o \
7        ts_cfg.o tsvector.o query_cleanup.o crc32.o query.o gistidx.o \
8        tsvector_op.o rank.o ts_stat.o \
9        query_util.o query_support.o query_rewrite.o query_gist.o \
10        ts_locale.o ts_lexize.o ginidx.o
11
12 SUBDIRS     := snowball ispell wordparser
13 SUBDIROBJS  := $(SUBDIRS:%=%/SUBSYS.o)
14
15 OBJS    += $(SUBDIROBJS)
16
17 PG_CPPFLAGS = -I$(srcdir)/snowball -I$(srcdir)/ispell -I$(srcdir)/wordparser
18
19 DATA = stopword/english.stop stopword/russian.stop stopword/russian.stop.utf8 thesaurus
20 DATA_built = tsearch2.sql uninstall_tsearch2.sql
21 DOCS = README.tsearch2
22 REGRESS = tsearch2
23
24 SHLIB_LINK += $(filter -lm, $(LIBS))
25
26
27 ifdef USE_PGXS
28 PGXS := $(shell pg_config --pgxs)
29 include $(PGXS)
30 else
31 subdir = contrib/tsearch2
32 top_builddir = ../..
33 include $(top_builddir)/src/Makefile.global
34 include $(top_srcdir)/contrib/contrib-global.mk
35 endif
36
37
38 $(SUBDIROBJS): $(SUBDIRS:%=%-recursive) ;
39
40 .PHONY: $(SUBDIRS:%=%-recursive)
41
42 $(SUBDIRS:%=%-recursive):
43         $(MAKE) -C $(subst -recursive,,$@) SUBSYS.o
44
45 tsearch2.sql: tsearch.sql.in
46         sed -e 's,MODULE_PATHNAME,$$libdir/$(MODULE_big),g' $< >$@
47
48 uninstall_tsearch2.sql: untsearch.sql.in
49         cp $< $@
50
51 .PHONY: subclean
52 clean: subclean
53
54 subclean:
55         for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean || exit; done