From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on070e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe48::70e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1AE0281E46 for ; Wed, 18 Jan 2017 15:35:27 -0800 (PST) Received: from DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.23) by DF4PR84MB0138.NAMPRD84.PROD.OUTLOOK.COM (10.162.192.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.845.12; Wed, 18 Jan 2017 23:35:26 +0000 Received: from DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.23]) by DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM ([10.162.192.23]) with mapi id 15.01.0845.013; Wed, 18 Jan 2017 23:35:26 +0000 From: "Huber, Brandon" To: "edk2-devel (edk2-devel@lists.01.org)" Thread-Topic: DSC macro expansion Thread-Index: AdJx3wIrGWFOlc3CQMKmYniX23lLXQ== Date: Wed, 18 Jan 2017 23:35:26 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=brandon.huber@hp.com; x-originating-ip: [15.65.254.3] x-ms-office365-filtering-correlation-id: a245e2d3-3cb6-46c0-6f94-08d43ffaae12 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DF4PR84MB0138; x-microsoft-exchange-diagnostics: 1; DF4PR84MB0138; 7:o/TMBaugNyjpVwNIt0oEEXzJ6SHFhAqaW5n4v2H4FaOe59OeblNUUxd/E0Jwa8ntIDjejZVkhyIBR2guzcShOBqO1FnxxKUNKFQO4UkM626WvkUveiYoEw5PNf6NoSSsU6cL5vPr15qq1wG2A/YI/jRV6ciRLpFHYLHWdU8/YODN4cVrCewx8tSO4uvlNw3ePnehB4hNnWvTkfJUmGfza7u6ikiDZ/oQAmzAk7W+GS6o0FClcWEwXafSWVI9JKmOcGmGWtkN8xLxF7Jc9vvuJBkAnh5+H7ysTjei+41Wh0D9fVxkFpK5fK6sGSmCsf4rZcNeSKfBz6m6+gihWhIWyeMrUVJMtoTfQMMJUDLVpuukWhTUfUTaO5khvCgYvl3ElelmkEhpXwyp47KfuCyDGivOJwDRp1oxpqEzZ88Ze6XmjS5/y+9dDG2jqNGSI03oxAMbBWCJ7FJTfvN+X3CzFg== x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(166708455590820)(21748063052155); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148); SRVR:DF4PR84MB0138; BCL:0; PCL:0; RULEID:; SRVR:DF4PR84MB0138; x-forefront-prvs: 01917B1794 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(7916002)(39450400003)(199003)(53754006)(189002)(6602003)(9326002)(7116003)(6116002)(68736007)(81166006)(81156014)(3846002)(33656002)(790700001)(5660300001)(3480700004)(54356999)(110136003)(236005)(102836003)(7906003)(7736002)(53936002)(74316002)(86362001)(8936002)(50986999)(2906002)(122556002)(7696004)(66066001)(8676002)(9686003)(6916009)(101416001)(105586002)(6306002)(97736004)(450100001)(3660700001)(38730400001)(106356001)(6506006)(77096006)(54896002)(2900100001)(3280700002)(606005)(55016002)(107886002)(189998001)(92566002)(6436002)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:DF4PR84MB0138; H:DF4PR84MB0137.NAMPRD84.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: hp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: hp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2017 23:35:26.0319 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: ca7981a2-785a-463d-b82a-3db87dfc3ce6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DF4PR84MB0138 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: DSC macro expansion X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jan 2017 23:35:27 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi All, There seems to be a discrepancy between the DSC spec and the EDKII implemen= tation regarding what macros are allowed in !include statements within a DS= C file. >>From the spec (v1.26 section 2.2.5): Macros, defined in this file, are not permitted in the path or file name of= the !include statement, as these files are included prior to processing th= e file for macros. If the path starts with a "$" character, then one of the= system environment variables, $(WORKSPACE), $(EDK_SOURCE), $(EFI_SOURCE), = or $(ECP_SOURCE) is being used; only these system environment variables are= permitted to start the path of the included file. Yet from experimentation, all macros defined in DSC files seem to be permit= ted in !include statements by the build tools. Is the spec out of date, or = is the code wrong? I think the code in question is _GetMacros() in BaseTools/Source/Python/Wor= kspace/WorkspaceDatabase.py (https://github.com/tianocore/edk2/commit/0d2711a69397d2971079121df4326d= 84736c181e#diff-7cfd5e9099421b207e7718d47950d40dR148). Thanks, -Brandon