Commit 9fc990e8 authored by Inigo Martínez's avatar Inigo Martínez Committed by Thomas Haller

build: library paths as parameters for script uses the `LD_LIBRARY_PATH` to
prepend directories to the library search path, which is useful to
load a just built libnm shared library, when generating the
`nm-settings-docs.xml` and `nm-property-docs.xml` files.

However, this is a problem for meson, which is not able to set
environment variables when executing the script.

This patch adds a new optional parameter, `-l` or `--lib-path` that
can be used to pass different paths to be prepended without using
the `LD_LIBRARY_PATH` environment, which can still be used.

[ fix script to handle None lib_path argument]
parent 7d074fa6
......@@ -183,6 +183,7 @@ def usage():
parser = argparse.ArgumentParser()
parser.add_argument('-l', '--lib-path', metavar='PATH', action='append', help='path to scan for shared libraries')
parser.add_argument('-g', '--gir', metavar='FILE', help='NM-1.0.gir file')
parser.add_argument('-x', '--overrides', metavar='FILE', help='documentation overrides file')
parser.add_argument('-o', '--output', metavar='FILE', help='output file')
......@@ -191,6 +192,10 @@ args = parser.parse_args()
if args.gir is None or args.output is None:
if args.lib_path:
for lib in args.lib_path:
girxml = ET.parse(args.gir).getroot()
outfile = open(args.output, mode='w')
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment