Skip to contentSkip to conversation

meson: make modprobedatadir an option

PATCH New Michal Suchanek 1 participant 1 message Mar 10, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: make modprobedatadir an option

The modprobe.d directory location is hardcoded.

Fixes 4e5faa1 ("build: Add meson build infrastructure")
---
 contrib/meson.build | 5 ++++-
 meson_options.txt   | 2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)
contrib/meson.build +4 -1
index 4ed3c20..ad63a50 100644
@@ -24,5 +24,8 @@ if bashcompletiondir != 'no'
   install_data('ndctl', rename : 'cxl', install_dir : bashcompletiondir)
 endif
 
-modprobedatadir = get_option('sysconfdir') + '/modprobe.d/'
+modprobedatadir = get_option('modprobedatadir')
+if modprobedatadir == ''
+  modprobedatadir = get_option('modprobedatadir')
+endif
 install_data('nvdimm-security.conf', install_dir : modprobedatadir)
meson_options.txt +2 -0
index aa4a6dc..3a68460 100644
@@ -23,3 +23,5 @@ option('pkgconfiglibdir', type : 'string', value : '',
        description : 'directory for standard pkg-config files')
 option('bashcompletiondir', type : 'string',
        description : '''${datadir}/bash-completion/completions''')
+option('modprobedatadir', type : 'string',
+       description : '''${sysconfdir}/modprobe.d/''')
Signature · 1 line
2.35.1