@@ -7,24 +7,26 @@ override CPPFLAGS := -I. -I./snowball -I./ispell -I./wordparser $(CPPFLAGS)
77
88MODULE_big = tsearch2
99OBJS = dict_ex.o dict.o snmap.o stopword.o common.o prs_dcfg.o \
10- snowball/english_stem.o snowball/api.o snowball/russian_stem.o snowball/utilities.o \
11- dict_snowball.o ispell/spell.o dict_ispell.o dict_syn.o \
12- wparser.o wordparser/parser.o wordparser/deflex.o wparser_def.o \
10+ dict_snowball.o dict_ispell.o dict_syn.o \
11+ wparser.o wparser_def.o \
1312 ts_cfg.o tsvector.o rewrite.o crc32.o query.o gistidx.o \
1413 tsvector_op.o rank.o ts_stat.o
1514
15+ SUBDIRS := snowball ispell wordparser
16+ SUBDIROBJS := $(SUBDIRS:%=%/SUBSYS.o )
17+
18+ OBJS: = $(OBJS ) $(SUBDIROBJS )
19+
20+ $(SUBDIROBJS ) : $(SUBDIRS:%=%-recursive ) ;
21+
22+ $(SUBDIRS:% =%-recursive):
23+ $(MAKE) -C $(subst -recursive,,$@) SUBSYS.o
24+
1625DATA_built = tsearch2.sql untsearch2.sql
1726DOCS = README.tsearch2
1827REGRESS = tsearch2
1928
20- wordparser/parser.c : wordparser/parser.l
21- ifdef FLEX
22- $(FLEX) $(FLEXFLAGS) -8 -Ptsearch2_yy -o'$@' $<
23- else
24- @$(missing) flex $< $@
25- endif
26-
27- EXTRA_CLEAN = wordparser/parser.c tsearch2.sql.in
29+ EXTRA_CLEAN = tsearch2.sql.in
2830
2931SHLIB_LINK := -lm
3032include $(top_srcdir ) /contrib/contrib-global.mk
@@ -40,5 +42,10 @@ tsearch2.sql.in: tsearch.sql._in
4042 sed ' s,DATA_PATH,$(datadir),g' < $< > $@
4143
4244untsearch2.sql : untsearch.sql.in
43- cp $< $@
45+ cp $< $@
46+
47+ clean : subclean
4448
49+ subclean :
50+ for dir in $( SUBDIRS) ; do $( MAKE) -C $$ dir clean || exit ; done
51+
0 commit comments