From: Mark Lobodzinski Date: Wed, 2 Nov 2016 21:25:26 +0000 (-0600) Subject: scripts: Extend vk-generate for 'all' parameter X-Git-Tag: upstream/1.1.92~2220 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9f95ba0a1b711d01a1f842ee0f893d5fdd8611a;p=platform%2Fupstream%2FVulkan-Tools.git scripts: Extend vk-generate for 'all' parameter A different script is used to generate the loader's windows def file (loader\vk-loader-generate.py). Added the ability for the main script to also create the loader's def file. Change-Id: Ib5caaefe85f84489e3a9f70e20104c27f070c0e8 --- diff --git a/vk-generate.py b/vk-generate.py index 92c3b62..e2f37d9 100755 --- a/vk-generate.py +++ b/vk-generate.py @@ -84,6 +84,8 @@ class Subcommand(object): * limitations under the License. * * Author: Courtney Goeltzenleuchter + * Author: Jon Ashburn + * Author: Mark Lobodzinski */""" def generate_header(self): @@ -291,9 +293,15 @@ class WinDefFileSubcommand(Subcommand): body.append("LIBRARY " + self.library) body.append("EXPORTS") - for proto in self.exports: - if self.library != "VkLayerSwapchain" or proto != "vkEnumerateInstanceExtensionProperties" and proto != "vkEnumerateInstanceLayerProperties": - body.append( proto) + if self.argv[1] != "all": + for proto in self.exports: + if self.library != "VkLayerSwapchain" or proto != "vkEnumerateInstanceExtensionProperties" and proto != "vkEnumerateInstanceLayerProperties": + body.append(proto) + else: + for proto in self.protos: + if self.exports and proto.name not in self.exports: + continue + body.append(" vk" + proto.name) return "\n".join(body)