Avoid making a dependency between plugins and the build.ninja file
authorThibault Saunier <tsaunier@igalia.com>
Thu, 16 May 2019 01:14:16 +0000 (21:14 -0400)
committerThibault Saunier <tsaunier@igalia.com>
Thu, 16 May 2019 03:23:46 +0000 (23:23 -0400)
Basically meson detects that we pass file paths to run_command to regenerate the build.ninja file when those change

meson.build
scripts/generate_plugins_path.py

index ca7826cfdf22675b5b7c7e1851943c4fb51e0d5d..632ee13fbfb2b4c4092e9e12369e503f82e4d8b8 100644 (file)
@@ -64,10 +64,12 @@ if build_system == 'windows'
   subproject('win-nasm')
 endif
 
+pathsep = host_machine.system() == 'windows' ? ';' : ':'
+
 subproject('orc', required: get_option('orc'))
 
 subprojects_names = []
-all_plugins = []
+all_plugins = ''
 foreach sp : subprojects
   project_name = sp[0]
   build_infos = sp[1]
@@ -82,7 +84,7 @@ foreach sp : subprojects
 
   if subproj.found() and build_infos.has_key('build-hotdoc', default: false)
     foreach plugin: subproj.get_variable('plugins')
-      all_plugins += plugin.full_path()
+      all_plugins += pathsep + plugin.full_path()
     endforeach
     if documented_projects != ''
       documented_projects += ','
index 89288244c39813b7468fa8ee4f10bdd50091b147..d57c60c2fe7fa929ab272ac8d23233bca5514182 100644 (file)
@@ -7,12 +7,12 @@ import json
 if __name__ == "__main__":
     parser = argparse.ArgumentParser()
     parser.add_argument("--builddir", help="The meson build directory")
-    parser.add_argument(dest="plugins", help="The list of plugins", nargs="+")
+    parser.add_argument(dest="plugins", help="The list of plugins")
 
     options = parser.parse_args()
 
     all_paths = set()
-    for plugin in options.plugins:
+    for plugin in options.plugins.split(os.pathsep):
         all_paths.add(os.path.dirname(plugin))
 
     with open(os.path.join(options.builddir, 'GstPluginsPath.json'), "w") as f: