From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cam-smtp0.cambridge.arm.com (cam-smtp0.cambridge.arm.com [217.140.106.51]) by mx.groups.io with SMTP id smtpd.web10.5807.1593171621784526385 for ; Fri, 26 Jun 2020 04:40:22 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.106.51, mailfrom: pierre.gondois@arm.com) Received: from E119881.Arm.com (E119881.Arm.com [10.1.197.28]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id 05QBeI74004773; Fri, 26 Jun 2020 12:40:19 +0100 From: "PierreGondois" To: devel@edk2.groups.io Cc: Pierre Gondois , sami.mujawar@arm.com, tomas.pilar@arm.com, bob.c.feng@intel.com, liming.gao@intel.com, nd@arm.com Subject: [PATCH v4 1/4] BaseTools: Generate multiple rules when multiple output files Date: Fri, 26 Jun 2020 12:40:10 +0100 Message-Id: <20200626114013.125524-2-pierre.gondois@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20200626114013.125524-1-pierre.gondois@arm.com> References: <20200626114013.125524-1-pierre.gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: base64 RnJvbTogUGllcnJlIEdvbmRvaXMgPHBpZXJyZS5nb25kb2lzQGFybS5jb20+CgpUaGlzIHBhdGNo IG1vZGlmaWVzIHRoZSBNYWtlZmlsZSBnZW5lcmF0aW9uIG5vdCB0byBzdG9wCmFkZGluZyBNYWtm aWxlIHJ1bGVzIHdoZW4gdGhlIGZpcnN0IGZpbmFsIHRhcmdldCBpcyBmb3VuZC4KRS5nLjoKSWYg dGhlIGZvbGxvd2luZyBydWxlcyBhcmUgZGVzY3JpYmVkIGluIGJ1aWxkX3J1bGUudHh0OgogLVtS dWxlMV06IC5YIGZpbGVzIGdlbmVyYXRlIC5ZIGFuZCAuWiBmaWxlczsKIC1bUnVsZTJdOiAuWiBm aWxlcyBnZW5lcmF0ZSAuWjEgZmlsZXMuCkN1cnJlbnRseSwga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ICAgICAgICAgICAgICAgUnVsZU9iamVjdCA9IHNlbGYu QnVpbGRSdWxlc1tTb3VyY2UuRXh0XQ0KICAgICAgICAgICAgIGVsc2U6DQotICAgICAgICAgICAg ICAgICMgc3RvcCBhdCBubyBtb3JlIHJ1bGVzDQotICAgICAgICAgICAgICAgIGlmIExhc3RUYXJn ZXQ6DQotICAgICAgICAgICAgICAgICAgICBzZWxmLl9GaW5hbEJ1aWxkVGFyZ2V0TGlzdC5hZGQo TGFzdFRhcmdldCkNCi0gICAgICAgICAgICAgICAgYnJlYWsNCisgICAgICAgICAgICAgICAgIyBO byBtb3JlIHJ1bGUgdG8gYXBwbHk6IFNvdXJjZSBpcyBhIGZpbmFsIHRhcmdldC4NCisgICAgICAg ICAgICAgICAgRmluYWxUYXJnZXROYW1lLmFkZChTb3VyY2UpDQorICAgICAgICAgICAgICAgIGNv bnRpbnVlDQogDQogICAgICAgICAgICAgRmlsZVR5cGUgPSBSdWxlT2JqZWN0LlNvdXJjZUZpbGVU eXBlDQogICAgICAgICAgICAgc2VsZi5fRmlsZVR5cGVzW0ZpbGVUeXBlXS5hZGQoU291cmNlKQ0K IA0KICAgICAgICAgICAgICMgc3RvcCBhdCBTVEFUSUNfTElCUkFSWSBmb3IgbGlicmFyeQ0KICAg ICAgICAgICAgIGlmIHNlbGYuSXNMaWJyYXJ5IGFuZCBGaWxlVHlwZSA9PSBUQUJfU1RBVElDX0xJ QlJBUlk6DQotICAgICAgICAgICAgICAgIGlmIExhc3RUYXJnZXQ6DQotICAgICAgICAgICAgICAg ICAgICBzZWxmLl9GaW5hbEJ1aWxkVGFyZ2V0TGlzdC5hZGQoTGFzdFRhcmdldCkNCi0gICAgICAg ICAgICAgICAgYnJlYWsNCisgICAgICAgICAgICAgICAgRmluYWxUYXJnZXROYW1lLmFkZChTb3Vy Y2UpDQorICAgICAgICAgICAgICAgIGNvbnRpbnVlDQogDQogICAgICAgICAgICAgVGFyZ2V0ID0g UnVsZU9iamVjdC5BcHBseShTb3VyY2UsIHNlbGYuQnVpbGRSdWxlT3JkZXIpDQogICAgICAgICAg ICAgaWYgbm90IFRhcmdldDoNCi0gICAgICAgICAgICAgICAgaWYgTGFzdFRhcmdldDoNCi0gICAg ICAgICAgICAgICAgICAgIHNlbGYuX0ZpbmFsQnVpbGRUYXJnZXRMaXN0LmFkZChMYXN0VGFyZ2V0 KQ0KLSAgICAgICAgICAgICAgICBicmVhaw0KLSAgICAgICAgICAgIGVsaWYgbm90IFRhcmdldC5P dXRwdXRzOg0KLSAgICAgICAgICAgICAgICAjIE9ubHkgZG8gYnVpbGQgZm9yIHRhcmdldCB3aXRo IG91dHB1dHMNCi0gICAgICAgICAgICAgICAgc2VsZi5fRmluYWxCdWlsZFRhcmdldExpc3QuYWRk KFRhcmdldCkNCisgICAgICAgICAgICAgICAgIyBObyBUYXJnZXQ6IFNvdXJjZSBpcyBhIGZpbmFs IHRhcmdldC4NCisgICAgICAgICAgICAgICAgRmluYWxUYXJnZXROYW1lLmFkZChTb3VyY2UpDQor ICAgICAgICAgICAgICAgIGNvbnRpbnVlDQogDQorICAgICAgICAgICAgVGFyZ2V0TGlzdC5hZGQo VGFyZ2V0KQ0KICAgICAgICAgICAgIHNlbGYuX0J1aWxkVGFyZ2V0c1tGaWxlVHlwZV0uYWRkKFRh cmdldCkNCiANCiAgICAgICAgICAgICBpZiBub3QgU291cmNlLklzQmluYXJ5IGFuZCBTb3VyY2Ug PT0gRmlsZToNCkBAIC05MTYsMTIgKzkxNiwxNiBAQCBjbGFzcyBNb2R1bGVBdXRvR2VuKEF1dG9H ZW4pOgogDQogICAgICAgICAgICAgIyB0byBhdm9pZCBjeWNsaWMgcnVsZQ0KICAgICAgICAgICAg IGlmIEZpbGVUeXBlIGluIFJ1bGVDaGFpbjoNCi0gICAgICAgICAgICAgICAgYnJlYWsNCisgICAg ICAgICAgICAgICAgRWRrTG9nZ2VyLmVycm9yKCJidWlsZCIsIEVSUk9SX1NUQVRFTUVOVCwgIkN5 Y2xpYy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