summaryrefslogtreecommitdiffstats
path: root/src/backend/tsearch/Makefile
blob: cdb259eca5811ee87ffabad97a667e113c005359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#-------------------------------------------------------------------------
#
# Makefile for backend/tsearch
#
# Copyright (c) 2006-2021, PostgreSQL Global Development Group
#
# src/backend/tsearch/Makefile
#
#-------------------------------------------------------------------------
subdir = src/backend/tsearch
top_builddir = ../../..
include $(top_builddir)/src/Makefile.global

DICTDIR=tsearch_data

# List of dictionaries files
DICTFILES=synonym_sample.syn thesaurus_sample.ths \
	hunspell_sample.affix \
	ispell_sample.affix ispell_sample.dict \
	hunspell_sample_long.affix hunspell_sample_long.dict \
	hunspell_sample_num.affix hunspell_sample_num.dict

# Local paths to dictionaries files
DICTFILES_PATH=$(addprefix dicts/,$(DICTFILES))

OBJS = \
	dict.o \
	dict_ispell.o \
	dict_simple.o \
	dict_synonym.o \
	dict_thesaurus.o \
	regis.o \
	spell.o \
	to_tsany.o \
	ts_locale.o \
	ts_parse.o \
	ts_selfuncs.o \
	ts_typanalyze.o \
	ts_utils.o \
	wparser.o \
	wparser_def.o

include $(top_srcdir)/src/backend/common.mk

.PHONY: install-data
install-data: $(DICTFILES_PATH) installdirs
	$(INSTALL_DATA) $(addprefix $(srcdir)/,$(DICTFILES_PATH)) '$(DESTDIR)$(datadir)/$(DICTDIR)/'

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

.PHONY: uninstall-data
uninstall-data:
	rm -rf $(addprefix '$(DESTDIR)$(datadir)/$(DICTDIR)/',$(DICTFILES))