1
1
# PGXS: PostgreSQL extensions makefile
2
2
3
- # $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.10 2007/06/26 22:05:04 tgl Exp $
3
+ # $PostgreSQL: pgsql/src/makefiles/pgxs.mk,v 1.11 2007/10/16 15:59:59 tgl Exp $
4
4
5
5
# This file contains generic rules to build many kinds of simple
6
6
# extension modules. You only need to set a few variables and include
22
22
# DATA -- random files to install into $PREFIX/share/contrib
23
23
# DATA_built -- random files to install into $PREFIX/share/contrib,
24
24
# which need to be built first
25
+ # DATA_TSEARCH -- random files to install into $PREFIX/share/tsearch_data
25
26
# DOCS -- random files to install under $PREFIX/doc/contrib
26
27
# SCRIPTS -- script files (not binaries) to install into $PREFIX/bin
27
28
# SCRIPTS_built -- script files (not binaries) to install into $PREFIX/bin,
@@ -97,6 +98,12 @@ ifneq (,$(DATA)$(DATA_built))
97
98
$(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/contrib'; \
98
99
done
99
100
endif # DATA
101
+ ifneq (,$(DATA_TSEARCH ) )
102
+ @for file in $(addprefix $(srcdir)/, $(DATA_TSEARCH)); do \
103
+ echo "$(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/tsearch_data'"; \
104
+ $(INSTALL_DATA) $$file '$(DESTDIR)$(datadir)/tsearch_data'; \
105
+ done
106
+ endif # DATA_TSEARCH
100
107
ifdef MODULES
101
108
@for file in $(addsuffix $(DLSUFFIX), $(MODULES)); do \
102
109
echo "$(INSTALL_SHLIB) $$file '$(DESTDIR)$(pkglibdir)'"; \
@@ -135,6 +142,9 @@ installdirs:
135
142
ifneq (,$(DATA )$(DATA_built ) )
136
143
$(mkinstalldirs) '$(DESTDIR)$(datadir)/contrib'
137
144
endif
145
+ ifneq (,$(DATA_TSEARCH ) )
146
+ $(mkinstalldirs) '$(DESTDIR)$(datadir)/tsearch_data'
147
+ endif
138
148
ifneq (,$(MODULES )$(MODULE_big ) )
139
149
$(mkinstalldirs) '$(DESTDIR)$(pkglibdir)'
140
150
endif
@@ -152,6 +162,9 @@ uninstall:
152
162
ifneq (,$(DATA )$(DATA_built ) )
153
163
rm -f $(addprefix '$(DESTDIR)$(datadir)'/contrib/, $(notdir $(DATA) $(DATA_built)))
154
164
endif
165
+ ifneq (,$(DATA_TSEARCH ) )
166
+ rm -f $(addprefix '$(DESTDIR)$(datadir)'/tsearch_data/, $(notdir $(DATA_TSEARCH)))
167
+ endif
155
168
ifdef MODULES
156
169
rm -f $(addprefix '$(DESTDIR)$(pkglibdir)'/, $(addsuffix $(DLSUFFIX), $(MODULES)))
157
170
endif
0 commit comments