Skip to content

Commit 75ef834

Browse files
Martin Belangerigaw
authored andcommitted
meson: Use configure_file() install instead of install_data()
Use configure_file() with the install argument instead of using a separate install_data(). This fixes a problem when nvme-cli is used as a subproject of another meson project. Signed-off-by: Martin Belanger <[email protected]>
1 parent 13cee90 commit 75ef834

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

meson.build

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ disc = configure_file(
232232
input: 'etc/discovery.conf.in',
233233
output: 'discovery.conf',
234234
configuration: substs,
235+
install: true,
236+
install_dir: join_paths(sysconfdir, 'nvme'),
235237
)
236238

237239
dracut_files = [
@@ -243,6 +245,8 @@ foreach file : dracut_files
243245
input: 'nvmf-autoconnect/dracut-conf/' + file + '.in',
244246
output: file,
245247
configuration: substs,
248+
install: true,
249+
install_dir: dracutrulesdir,
246250
)
247251
endforeach
248252

@@ -259,6 +263,8 @@ foreach file : systemd_files
259263
input: 'nvmf-autoconnect/systemd/' + file + '.in',
260264
output: file,
261265
configuration: substs,
266+
install: true,
267+
install_dir: systemddir,
262268
)
263269
endforeach
264270

@@ -276,6 +282,8 @@ foreach file : udev_files
276282
input: 'nvmf-autoconnect/udev-rules/' + file + '.in',
277283
output: file,
278284
configuration: substs,
285+
install: true,
286+
install_dir: udevrulesdir
279287
)
280288
endforeach
281289

@@ -323,31 +331,15 @@ executable(
323331
install_dir: sbindir
324332
)
325333

334+
libnvme_subproject = subproject('libnvme')
335+
326336
################################################################################
327337
install_data('completions/bash-nvme-completion.sh',
328338
rename: 'nvme',
329339
install_dir: datadir + '/bash-completion/completions')
330340
install_data('completions/_nvme',
331341
install_dir: datadir + '/zsh/site-functions')
332342

333-
foreach file : dracut_files
334-
install_data(meson.current_build_dir() + '/' + file,
335-
install_dir: dracutrulesdir)
336-
endforeach
337-
338-
foreach file : systemd_files
339-
install_data(meson.current_build_dir() + '/' + file,
340-
install_dir: systemddir)
341-
endforeach
342-
343-
foreach file : udev_files
344-
install_data(meson.current_build_dir() + '/' + file,
345-
install_dir: udevrulesdir)
346-
endforeach
347-
348-
install_data(disc,
349-
install_dir: join_paths(sysconfdir, 'nvme'))
350-
351343
################################################################################
352344
if meson.version().version_compare('>=0.53.0')
353345
path_dict = {

0 commit comments

Comments
 (0)