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.54]) by mx.groups.io with SMTP id smtpd.web11.22436.1593612373211120188 for ; Wed, 01 Jul 2020 07:06:13 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.106.54, 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 061E69Zo029795; Wed, 1 Jul 2020 15:06:10 +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 2/5] BaseTools: Generate multiple rules when multiple output files Date: Wed, 1 Jul 2020 15:06:01 +0100 Message-Id: <20200701140604.5292-3-pierre.gondois@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20200701140604.5292-1-pierre.gondois@arm.com> References: <20200701140604.5292-1-pierre.gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: base64 RnJvbTogUGllcnJlIEdvbmRvaXMgPHBpZXJyZS5nb25kb2lzQGFybS5jb20+CgpUaGlzIHBhdGNo IG1vZGlmaWVzIHRoZSBNYWtlZmlsZSBnZW5lcmF0aW9uIG5vdCB0byBzdG9wCmFkZGluZyBNYWtm aWxlIHJ1bGVzIHdoZW4gdGhlIGZpcnN0IGZpbmFsIHRhcmdldCBpcyBmb3VuZC4KRS5nLjoKSWYg dGhlIGZvbGxvd2luZyBydWxlcyBhcmUgZGVzY3JpYmVkIGluIGJ1aWxkX3J1bGUudHh0OgogLVtS dWxlMV06IC5YIGZpbGVzIGdlbmVyYXRlIC5ZIGFuZCAuWiBmaWxlczsKIC1bUnVsZTJdOiAuWiBm aWxlcyBnZW5lcmF0ZSAuWjEgZmlsZXMuCkN1cnJlbnRseSwgaWY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RSdWxlczoNCiAgICAgICAgICAgICAgICAgUnVsZU9iamVj dCA9IHNlbGYuQnVpbGRSdWxlc1tTb3VyY2UuRXh0XQ0KICAgICAgICAgICAgIGVsc2U6DQotICAg ICAgICAgICAgICAgICMgc3RvcCBhdCBubyBtb3JlIHJ1bGVzDQotICAgICAgICAgICAgICAgIGlm IExhc3RUYXJnZXQ6DQotICAgICAgICAgICAgICAgICAgICBzZWxmLl9GaW5hbEJ1aWxkVGFyZ2V0 TGlzdC5hZGQoTGFzdFRhcmdldCkNCi0gICAgICAgICAgICAgICAgYnJlYWsNCisgICAgICAgICAg ICAgICAgIyBObyBtb3JlIHJ1bGUgdG8gYXBwbHk6IFNvdXJjZSBpcyBhIGZpbmFsIHRhcmdldC4N CisgICAgICAgICAgICAgICAgRmluYWxUYXJnZXROYW1lLmFkZChTb3VyY2UpDQorICAgICAgICAg ICAgICAgIGNvbnRpbnVlDQogDQogICAgICAgICAgICAgRmlsZVR5cGUgPSBSdWxlT2JqZWN0LlNv dXJjZUZpbGVUeXBlDQogICAgICAgICAgICAgc2VsZi5fRmlsZVR5cGVzW0ZpbGVUeXBlXS5hZGQo U291cmNlKQ0KIA0KICAgICAgICAgICAgICMgc3RvcCBhdCBTVEFUSUNfTElCUkFSWSBmb3IgbGli cmFyeQ0KICAgICAgICAgICAgIGlmIHNlbGYuSXNMaWJyYXJ5IGFuZCBGaWxlVHlwZSA9PSBUQUJf U1RBVElDX0xJQlJBUlk6DQotICAgICAgICAgICAgICAgIGlmIExhc3RUYXJnZXQ6DQotICAgICAg ICAgICAgICAgICAgICBzZWxmLl9GaW5hbEJ1aWxkVGFyZ2V0TGlzdC5hZGQoTGFzdFRhcmdldCkN Ci0gICAgICAgICAgICAgICAgYnJlYWsNCisgICAgICAgICAgICAgICAgRmluYWxUYXJnZXROYW1l LmFkZChTb3VyY2UpDQorICAgICAgICAgICAgICAgIGNvbnRpbnVlDQogDQogICAgICAgICAgICAg VGFyZ2V0ID0gUnVsZU9iamVjdC5BcHBseShTb3VyY2UsIHNlbGYuQnVpbGRSdWxlT3JkZXIpDQog ICAgICAgICAgICAgaWYgbm90IFRhcmdldDoNCi0gICAgICAgICAgICAgICAgaWYgTGFzdFRhcmdl dDoNCi0gICAgICAgICAgICAgICAgICAgIHNlbGYuX0ZpbmFsQnVpbGRUYXJnZXRMaXN0LmFkZChM YXN0VGFyZ2V0KQ0KLSAgICAgICAgICAgICAgICBicmVhaw0KLSAgICAgICAgICAgIGVsaWYgbm90 IFRhcmdldC5PdXRwdXRzOg0KLSAgICAgICAgICAgICAgICAjIE9ubHkgZG8gYnVpbGQgZm9yIHRh cmdldCB3aXRoIG91dHB1dHMNCi0gICAgICAgICAgICAgICAgc2VsZi5fRmluYWxCdWlsZFRhcmdl dExpc3QuYWRkKFRhcmdldCkNCisgICAgICAgICAgICAgICAgIyBObyBUYXJnZXQ6IFNvdXJjZSBp cyBhIGZpbmFsIHRhcmdldC4NCisgICAgICAgICAgICAgICAgRmluYWxUYXJnZXROYW1lLmFkZChT b3VyY2UpDQorICAgICAgICAgICAgICAgIGNvbnRpbnVlDQogDQorICAgICAgICAgICAgVGFyZ2V0 TGlzdC5hZGQoVGFyZ2V0KQ0KICAgICAgICAgICAgIHNlbGYuX0J1aWxkVGFyZ2V0c1tGaWxlVHlw ZV0uYWRkKFRhcmdldCkNCiANCiAgICAgICAgICAgICBpZiBub3QgU291cmNlLklzQmluYXJ5IGFu ZCBTb3VyY2UgPT0gRmlsZToNCkBAIC05MTYsMTIgKzkxNiwxNiBAQCBjbGFzcyBNb2R1bGVBdXRv R2VuKEF1dG9HZW4pOgogDQogICAgICAgICAgICAgIyB0byBhdm9pZCBjeWNsaWMgcnVsZQ0KICAg ICAgICAgICAgIGlmIEZpbGVUeXBlIGluIFJ1bGVDaGFpbjoNCi0gICAgICAgICAgICAgICAgYnJl YWsNCisgICAgICAgICAgICAgICAgRWRrTG9nZ2VyLmVycm9yKCJidWlsZCIsIEVSUk9SX1NUQVRF TUVOVCwgI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