Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8f68580

Browse files
committed
meson: Fix installation path computation
We have the long-standing logic to append "postgresql" to some installation paths if it does not already contain "pgsql" or "postgres". The existing meson implementation of that only considered the subdirectory under the prefix, not the prefix itself. Fix that, so that it now works the same way as the implementation in Makefile.global. Reviewed-by: Andres Freund <andres@anarazel.de> Discussion: https://www.postgresql.org/message-id/a6a6de12-f705-2b33-2fd9-9743277deb08@enterprisedb.com
1 parent 17e72ec commit 8f68580

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

meson.build

+6-4
Original file line numberDiff line numberDiff line change
@@ -465,22 +465,24 @@ pkg = 'postgresql'
465465

466466
dir_prefix = get_option('prefix')
467467

468+
dir_prefix_contains_pg = (dir_prefix.contains('pgsql') or dir_prefix.contains('postgres'))
469+
468470
dir_bin = get_option('bindir')
469471

470472
dir_data = get_option('datadir')
471-
if not (dir_data.contains('pgsql') or dir_data.contains('postgres'))
473+
if not (dir_prefix_contains_pg or dir_data.contains('pgsql') or dir_data.contains('postgres'))
472474
dir_data = dir_data / pkg
473475
endif
474476

475477
dir_sysconf = get_option('sysconfdir')
476-
if not (dir_sysconf.contains('pgsql') or dir_sysconf.contains('postgres'))
478+
if not (dir_prefix_contains_pg or dir_sysconf.contains('pgsql') or dir_sysconf.contains('postgres'))
477479
dir_sysconf = dir_sysconf / pkg
478480
endif
479481

480482
dir_lib = get_option('libdir')
481483

482484
dir_lib_pkg = dir_lib
483-
if not (dir_lib_pkg.contains('pgsql') or dir_lib_pkg.contains('postgres'))
485+
if not (dir_prefix_contains_pg or dir_lib_pkg.contains('pgsql') or dir_lib_pkg.contains('postgres'))
484486
dir_lib_pkg = dir_lib_pkg / pkg
485487
endif
486488

@@ -490,7 +492,7 @@ dir_include = get_option('includedir')
490492

491493
dir_include_pkg = dir_include
492494
dir_include_pkg_rel = ''
493-
if not (dir_include_pkg.contains('pgsql') or dir_include_pkg.contains('postgres'))
495+
if not (dir_prefix_contains_pg or dir_include_pkg.contains('pgsql') or dir_include_pkg.contains('postgres'))
494496
dir_include_pkg = dir_include_pkg / pkg
495497
dir_include_pkg_rel = pkg
496498
endif

0 commit comments

Comments
 (0)