Skip to content

Commit 093fab3

Browse files
anarazelpull[bot]
authored andcommitted
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
1 parent 1156ce4 commit 093fab3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,11 @@ prove = find_program(get_option('PROVE'), native: true, required: false)
333333
tar = find_program(get_option('TAR'), native: true)
334334
gzip = find_program(get_option('GZIP'), native: true)
335335
program_lz4 = find_program(get_option('LZ4'), native: true, required: false)
336-
touch = find_program('touch', native: true)
337336
openssl = find_program(get_option('OPENSSL'), native: true, required: false)
338337
program_zstd = find_program(get_option('ZSTD'), native: true, required: false)
339338
dtrace = find_program(get_option('DTRACE'), native: true, required: get_option('dtrace'))
340339
missing = find_program('config/missing', native: true)
340+
cp = find_program('cp', required: false, native: true)
341341

342342
bison_flags = []
343343
if bison.found()

src/common/unicode/meson.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ UNICODE_VERSION = '15.0.0'
55
unicode_data = {}
66
unicode_baseurl = 'https://www.unicode.org/Public/@0@/ucd/@1@'
77

8-
if not wget.found()
8+
if not wget.found() or not cp.found()
99
subdir_done()
1010
endif
1111

@@ -100,7 +100,7 @@ update_unicode = custom_target('update-unicode',
100100
depends: update_unicode_dep,
101101
output: ['dont-exist'],
102102
input: update_unicode_targets,
103-
command: ['cp', '@INPUT@', '@SOURCE_ROOT@/src/include/common/'],
103+
command: [cp, '@INPUT@', '@SOURCE_ROOT@/src/include/common/'],
104104
build_by_default: false,
105105
build_always_stale: true,
106106
)

0 commit comments

Comments
 (0)