1 # Copyright (c) 2022-2025, PostgreSQL Global Development Group
3 # Note: the order of this list determines the order in which the catalog
4 # header files are assembled into postgres.bki. BKI_BOOTSTRAP catalogs
5 # must appear first, and pg_statistic before pg_statistic_ext_data, and
6 # there are reputedly other, undocumented ordering dependencies.
23 'pg_largeobject_metadata.h',
28 'pg_statistic_ext_data.h',
39 'pg_db_role_setting.h',
51 'pg_foreign_data_wrapper.h',
52 'pg_foreign_server.h',
56 'pg_replication_origin.h',
63 'pg_partitioned_table.h',
68 'pg_publication_namespace.h',
69 'pg_publication_rel.h',
71 'pg_subscription_rel.h',
74 # The .dat files we need can just be listed alphabetically.
95 'pg_ts_config_map.dat',
101 bki_data_f = files(bki_data)
107 'system_constraints.sql',
116 dir_include_server / 'catalog',
117 dir_include_server / 'catalog',
119 dir_include_server / 'catalog',
122 foreach h : catalog_headers
123 fname = h.split('.h')[0] + '_d.h'
125 output_files += fname
126 output_install += dir_include_server / 'catalog'
129 generated_catalog_headers = custom_target('generated_catalog_headers',
130 output: output_files,
131 install_dir: output_install,
133 depend_files: bki_data_f + catalog_pm,
134 build_by_default: true,
138 files('../../backend/catalog/genbki.pl'),
139 '--include-path=@SOURCE_ROOT@/src/include',
140 '--set-version=' + pg_version_major.to_string(),
141 '--output=@OUTDIR@', '@INPUT@'
145 generated_headers += generated_catalog_headers.to_list()
147 # autoconf generates the file there, ensure we get a conflict
148 generated_sources_ac += {'src/include/catalog': output_files + ['bki-stamp']}
150 # 'reformat-dat-files' is a convenience target for rewriting the
151 # catalog data files in our standard format. This includes collapsing
152 # out any entries that are redundant with a BKI_DEFAULT annotation.
153 run_target('reformat-dat-files',
154 command: [perl, files('reformat_dat_file.pl'), '--output', '@CURRENT_SOURCE_DIR@', bki_data_f],
157 # 'expand-dat-files' is a convenience target for expanding out all
158 # default values in the catalog data files. This should be run before
159 # altering or removing any BKI_DEFAULT annotation.
160 run_target('expand-dat-files',
161 command: [perl, files('reformat_dat_file.pl'), '--output', '@CURRENT_SOURCE_DIR@', bki_data_f, '--full-tuples'],