Re: Inconsistency in installation of syscache_info.h - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inconsistency in installation of syscache_info.h
Date
Msg-id 1165652.1771268498@sss.pgh.pa.us
Whole thread Raw
In response to Inconsistency in installation of syscache_info.h  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Inconsistency in installation of syscache_info.h
List pgsql-hackers
I wrote:
> I happened to notice that syscache_info.h is installed into
> $installdir/include/server/catalog if you use a non-VPATH
> autoconf build, but not if you use a VPATH build or meson.
> This is not great IMO.

> Just to confuse matters even more, meson builds install a copy of
> src/include/catalog/README, which autoconf builds do not.

> ISTM we need to get these things in sync.

Here's a proposed patch for that.  I've confirmed we get identical
filesets from all three build methods with this.

Although this seems like clearly a bug, I'm not sure anyone would
thank us for changing the behavior in back branches; particularly
not packagers, who tend to pay close attention to the set of files
installed.  So I'm inclined to apply this to master only.

            regards, tom lane

diff --git a/src/include/catalog/Makefile b/src/include/catalog/Makefile
index c90022f7c57..24b527230d4 100644
--- a/src/include/catalog/Makefile
+++ b/src/include/catalog/Makefile
@@ -149,6 +149,7 @@ install: all installdirs
 ifeq ($(vpath_build),yes)
     $(INSTALL_DATA) schemapg.h '$(DESTDIR)$(includedir_server)'/catalog/schemapg.h
     $(INSTALL_DATA) syscache_ids.h '$(DESTDIR)$(includedir_server)'/catalog/syscache_ids.h
+    $(INSTALL_DATA) syscache_info.h '$(DESTDIR)$(includedir_server)'/catalog/syscache_info.h
     $(INSTALL_DATA) system_fk_info.h '$(DESTDIR)$(includedir_server)'/catalog/system_fk_info.h
     for file in $(GENERATED_HEADERS); do \
       $(INSTALL_DATA) $$file '$(DESTDIR)$(includedir_server)'/catalog/$$file || exit; \
@@ -160,7 +161,7 @@ installdirs:

 uninstall:
     rm -f $(addprefix '$(DESTDIR)$(datadir)'/, postgres.bki system_constraints.sql)
-    rm -f $(addprefix '$(DESTDIR)$(includedir_server)'/catalog/, schemapg.h syscache_ids.h system_fk_info.h
$(GENERATED_HEADERS))
+    rm -f $(addprefix '$(DESTDIR)$(includedir_server)'/catalog/, schemapg.h syscache_ids.h syscache_info.h
system_fk_info.h$(GENERATED_HEADERS)) 

 clean:
     rm -f bki-stamp $(GENBKI_OUTPUT_FILES)
diff --git a/src/include/catalog/meson.build b/src/include/catalog/meson.build
index b63cd584068..433bcc908ad 100644
--- a/src/include/catalog/meson.build
+++ b/src/include/catalog/meson.build
@@ -115,7 +115,7 @@ output_install = [
   dir_data,
   dir_include_server / 'catalog',
   dir_include_server / 'catalog',
-  false,
+  dir_include_server / 'catalog',
   dir_include_server / 'catalog',
 ]

diff --git a/src/include/meson.build b/src/include/meson.build
index b940c5cd3d6..7d734d92dab 100644
--- a/src/include/meson.build
+++ b/src/include/meson.build
@@ -173,6 +173,7 @@ install_subdir('catalog',
   exclude_files: [
     '.gitignore',
     'Makefile',
+    'README',
     'duplicate_oids',
     'meson.build',
     'reformat_dat_file.pl',

pgsql-hackers by date:

Previous
From: Pavlo Golub
Date:
Subject: Re: [PATCH] Add last_executed timestamp to pg_stat_statements
Next
From: Andres Freund
Date:
Subject: Re: make ExecInsertIndexTuples arguments less bad