Namely, ensure they are absolute paths and any trailing / is stripped.
$ meson setup -D moduledir=relative/ build/
...
ERROR: Problem encountered: User provided moduledir, 'relative' is not an absolute path.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Link: https://github.com/kmod-project/kmod/pull/209
[ Fix relative customdir ]
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
customdir = get_variable(dir_option)
if customdir == ''
customdir = def_path
+ else
+ if not customdir.startswith('/')
+ error('User provided @0@, \'@1@\' is not an absolute path.'
+ .format(dir_option, customdir))
+ endif
+ # Strip all leading/trailing and re-add only the leading one.
+ customdir = '' / customdir.strip('/')
endif
cdata.set_quoted(quoted, customdir)
set_variable(dir_option, customdir)