mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
This way, we can fold the list of lock names to occur in
BuiltinTrancheNames instead of having its own separate array. This
saves two lines of code in GetLWTrancheName and some space in
BuiltinTrancheNames, as foreseen in commit 74a7306310, as well as
removing the need for a separate lwlocknames.c file.
We still have to build lwlocknames.h using Perl code, which initially I
wanted to avoid, but it gives us the chance to cross-check
wait_event_names.txt.
Discussion: https://postgr.es/m/202401231025.gbv4nnte5fmm@alvherre.pgsql
22 lines
652 B
Meson
22 lines
652 B
Meson
# Copyright (c) 2022-2024, PostgreSQL Global Development Group
|
|
|
|
lwlocknames_h = custom_target('lwlocknames_h',
|
|
input: files(
|
|
'../../include/storage/lwlocklist.h',
|
|
'../../backend/utils/activity/wait_event_names.txt'),
|
|
output: ['lwlocknames.h'],
|
|
command: [
|
|
perl, files('../../backend/storage/lmgr/generate-lwlocknames.pl'),
|
|
'-o', '@OUTDIR@',
|
|
'@INPUT@'
|
|
],
|
|
build_by_default: true,
|
|
install: true,
|
|
install_dir: dir_include_server / 'storage',
|
|
)
|
|
|
|
generated_backend_headers += lwlocknames_h
|
|
|
|
# autoconf generates the file there, ensure we get a conflict
|
|
generated_sources_ac += {'src/backend/storage/lmgr': ['lwlocknames.h']}
|