Christoph Berg <m...@debian.org> writes:
>> this seems to have broken out-of-tree builds from tarballs:
>> 
>> /usr/bin/install -c -m 644 snowball_create.sql 
>> '/srv/projects/postgresql/debian/16/build/tmp_install/usr/share/postgresql/16'
>> /usr/bin/install: cannot stat 'snowball_create.sql': No such file or 
>> directory

I think the attached will do for a proper fix.  I'm not inclined
to re-wrap just for this.

                        regards, tom lane

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)'
 

Reply via email to