summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2023-05-23 15:15:57 +0000
committerTom Lane2023-05-23 15:15:57 +0000
commit5df5bea29070b420452bdb257c3dec1cf0419fca (patch)
tree1bb63dfce54193a8576af0802e6f3d5b33ee4358
parent0ffbe6e59197e5e2b3bf026f594fabb8ada9bec3 (diff)
Fix the install rule for snowball_create.sql.
This file could be in the current (build) directory if we just built it. However, when installing from a VPATH build from a tarball, it will exist in the source directory and gmake will therefore not rebuild it. Use the $< macro to find out where gmake found it. Oversight in b3a0d8324, which also exposes a buildfarm testing gap: we test install from VPATH builds from bare source trees, but not from tarballs. Per report from Christoph Berg. Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/backend/snowball/Makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/snowball/Makefile b/src/backend/snowball/Makefile
index 29076371db..4bebfa0250 100644
--- a/src/backend/snowball/Makefile
+++ b/src/backend/snowball/Makefile
@@ -106,10 +106,13 @@ $(SQLSCRIPT): snowball_create.pl snowball_func.sql.in snowball.sql.in
distprep: $(SQLSCRIPT)
-install: all installdirs install-lib
- $(INSTALL_DATA) $(SQLSCRIPT) '$(DESTDIR)$(datadir)'
+install: all installdirs install-lib install-script
$(INSTALL_DATA) $(addprefix $(srcdir)/stopwords/,$(stop_files)) '$(DESTDIR)$(datadir)/$(DICTDIR)'
+# $(SQLSCRIPT) might be in the srcdir or the build dir
+install-script: $(SQLSCRIPT)
+ $(INSTALL_DATA) $< '$(DESTDIR)$(datadir)'
+
installdirs: installdirs-lib
$(MKDIR_P) '$(DESTDIR)$(datadir)' '$(DESTDIR)$(datadir)/$(DICTDIR)'