postgres.git / summary / log / commit / refs
commit 401874ab020b44d8000ac90debef43a146b96d5a
Author: Andres Freund <andres@anarazel.de>
Date: Wed Mar 08 02:24:18 2023 +0000
First released in: 16.0
meson: don't require 'touch' binary, make use of 'cp' optional
We already didn't use touch (some earlier version of the meson build did ),
and cp is only used for updating unicode files. The latter already depends on
the optional availability of 'wget', so doing the same for 'cp' makes sense.
Eventually we probably want a portable command for updating source code as
part of a target, but for now...
Reported-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/70e96c34-64ee-e549-8c4a-f91a7a668804@dunslane.net
meson.build | 2 +-
src/common/unicode/meson.build | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meson.build b/meson.build
index 87cb974ad7c..f1ce4cb8e03 100644
--- a/meson.build
+++ b/meson.build
@@ -333,11 +333,11 @@ prove = find_program(get_option('PROVE'), native: true, required: false)
tar = find_program(get_option('TAR'), native: true)
gzip = find_program(get_option('GZIP'), native: true)
program_lz4 = find_program(get_option('LZ4'), native: true, required: false)
-touch = find_program('touch', native: true)
openssl = find_program(get_option('OPENSSL'), native: true, required: false)
program_zstd = find_program(get_option('ZSTD'), native: true, required: false)
dtrace = find_program(get_option('DTRACE'), native: true, required: get_option('dtrace'))
missing = find_program('config/missing', native: true)
+cp = find_program('cp', required: false, native: true)
bison_flags = []
if bison.found()
diff --git a/src/common/unicode/meson.build b/src/common/unicode/meson.build
index 63c81664de3..1ffece1550a 100644
--- a/src/common/unicode/meson.build
+++ b/src/common/unicode/meson.build
@@ -5,7 +5,7 @@ UNICODE_VERSION = '15.0.0'
unicode_data = {}
unicode_baseurl = 'https://www.unicode.org/Public/@0@/ucd/@1@'
-if not wget.found()
+if not wget.found() or not cp.found()
subdir_done()
endif
@@ -100,7 +100,7 @@ update_unicode = custom_target('update-unicode',
depends: update_unicode_dep,
output: ['dont-exist'],
input: update_unicode_targets,
- command: ['cp', '@INPUT@', '@SOURCE_ROOT@/src/include/common/'],
+ command: [cp, '@INPUT@', '@SOURCE_ROOT@/src/include/common/'],
build_by_default: false,
build_always_stale: true,
)
[parent: d69cd3a2e29c]