From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-in7.apple.com (mail-out7.apple.com [17.151.62.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 226C88210D for ; Mon, 12 Dec 2016 15:25:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; d=apple.com; s=mailout2048s; c=relaxed/simple; q=dns/txt; i=@apple.com; t=1481585142; h=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-version:Content-type: Content-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-reply-to:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Yp1VwZaVYBGpRGA2oEIc6NRkk4Ca95qC09y5wwz8zyM=; b=GqgjVpZHyqAuyVIo9BqYAweHEtZoYPZae4sD7LxLkS7Fas0tnUnwZyYXy7JccdSr s/OQ/uWiKancsmPpQ/cG/MBK73vW7MM70Yg6Rig9YEi+l5m7YMj9Z3stluDV+BHa EWZQh2VhSmIEH3G1jVhia5BYUxsIBBCYTb6cIilMF36+yaz4YQIJP51myE2JyUza EcWTiANNujxqXHZ8MCqXOaZHl8gh1+1kIiAYx/YTiB8ytcg6KVPenN07BKpnVfRb zPaZRY8i+F6yudXURQh0W4tdxaPV9aAjTw+ia/GIuoDGR4D+J+RGbyF64HOoUpRW PcMsDGG4mu945g9veKfNRw==; Received: from relay2.apple.com (relay2.apple.com [17.128.113.67]) by mail-in7.apple.com (Apple Secure Mail Relay) with SMTP id DE.02.18274.6F13F485; Mon, 12 Dec 2016 15:25:42 -0800 (PST) X-AuditID: 11973e16-bad4f9a000004762-02-584f31f6383d Received: from nwk-mmpp-sz12.apple.com (nwk-mmpp-sz12.apple.com [17.128.115.204]) by relay2.apple.com (Apple SCV relay) with SMTP id BD.2C.09148.6F13F485; Mon, 12 Dec 2016 15:25:42 -0800 (PST) MIME-version: 1.0 Received: from [17.153.16.11] by nwk-mmpp-sz12.apple.com (Oracle Communications Messaging Server 8.0.1.1.0 64bit (built Jun 15 2016)) with ESMTPSA id <0OI3008F3IES6K30@nwk-mmpp-sz12.apple.com>; Mon, 12 Dec 2016 15:25:42 -0800 (PST) Sender: afish@apple.com From: Andrew Fish In-reply-to: <000301d254c1$ae202810$0a607830$@de> Date: Mon, 12 Dec 2016 15:25:40 -0800 Cc: peter.kirmeier@ts.fujitsu.com, "edk2-devel@lists.01.org" Message-id: <0B00164A-A911-4884-B7CD-55FCF3D975BC@apple.com> References: <98ff7c88cfa14fd68742142e48300697@R01UKEXCASM124.r01.fujitsu.local> <000301d254c1$ae202810$0a607830$@de> To: Peter Kirmeier X-Mailer: Apple Mail (2.3226) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrALMWRmVeSWpSXmKPExsUi2FDorPvN0D/CYPlmJYt1e76xW/zcc5bd oveHiwOzx9K5q9k9Jl14zOwx/8gV9gDmKC6blNSczLLUIn27BK6MV1fcCw5rVbR+aWZvYGxR 6mLk5JAQMJE4t3USaxcjF4eQwF5GidOL2plgEn2XJoPZQgKHGCWe3XYAsXkFBCV+TL7H0sXI wcEsoC4xZUouRO9bRomWDW/YQGqEBcQl3p3ZxAxhm0u8PXESLM4moCyxYv4HdhCbU8BQoufs cbAaFgFViTdfVoDtYhYIl9j16hkjhK0t8eTdBVaIvTYSK6ZfYYG4ZyWjxI4dWSC2iICGxNnD q9lB7pEQkJWY/csL4vw9bBJf/otPYBSeheTqWQhXz0KyYAEj8ypGodzEzBzdzDxzvcSCgpxU veT83E2MoCCfbie2g/HhKqtDjAIcjEo8vAKb/CKEWBPLiitzDzFKc7AoifNOU/KPEBJITyxJ zU5NLUgtii8qzUktPsTIxMEp1cDI3rTqkUHPvr7kPc/4n/czP976zulR6vod+6f8epGg9+Xr xJ8/5H9HXMnfwnT81MNF0y8uNJ33TPEFz8/jRd2JS3vqYzp+KL1yvb7Q+sPJk+JFvhHHi6qM 1aNdRJbeEUwKXv2V85qIh9T/EMOVJewVmtpHuWaK7fW/ezs188XZl9s/h9hk37zErMRSnJFo qMVcVJwIAEKUS5xTAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgkeLIzCtJLcpLzFFi42IRbCg+o/vN0D/CoHmOtMW6Pd/YLX7uOctu 0fvDxYHZY+nc1eweky48ZvaYf+QKewBzFJdNSmpOZllqkb5dAlfGqyvuBYe1Klq/NLM3MLYo dTFyckgImEj0XZrMBGGLSVy4t54NxBYSOMQo8ey2A4jNKyAo8WPyPZYuRg4OZgF1iSlTcrsY uYBK3jJKtGx4A1YvLCAu8e7MJmYI21zi7YmTYHE2AWWJFfM/sIPYnAKGEj1nj4PVsAioSrz5 sgJsL7NAuMSuV88YIWxtiSfvLrBC7LWRWDH9CgvEPSsZJXbsyAKxRQQ0JM4eXs0Oco+EgKzE 7F9eExgFZyG5dBbCpbOQDF3AyLyKUaAoNSex0kgvsaAgJ1UvOT93EyM4XAuddzAeW2Z1iFGA g1GJh1dgk1+EEGtiWXFlLjAkOJiVRHhFDPwjhHhTEiurUovy44tKc1KLDzEmA70ykVlKNDkf GEt5JfGGJiYGJsbGZsbG5ibmpAkrifNaOntHCAmkJ5akZqemFqQWwWxh4uCUamCcvHnviWlS ci4X899LVnK5eL1OzMzkvcCTHtDqvLOZ9Wfogzst3YXar37/FWHtqnJT6av8ovHtf3jWjVsf pScvv/um0ziV6URDZvZ35vArb9mMz+1dc9GHfZ2w6c6kE7tcV7fv8dZxKVXbrfqTJVPm5Y8L PDsOtzh/X60QUGHydsv0wqmRO+crsRRnJBpqMRcVJwIAJUN1CpsCAAA= Subject: Re: $ escape sequence at build_rule.txt 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: Mon, 12 Dec 2016 23:25:43 -0000 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable > On Dec 12, 2016, at 1:49 PM, Peter Kirmeier = wrote: >=20 > Hi Andrew, >=20 > the line I wrote first.. > "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in = > > outfile.out > .. failed with this error message.. > makefile(527) : fatal error U1001: Syntaxfehler: ung=C2=B3ltiges = Zeichen "/" > in Makro=20 > (means syntax error due to invalid character "/" in macro) > ..and brought this result at the makefile: > "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$/,\"\"); print}" infile.in > > outfile.out >=20 Peter, You can also looks at the makefile (GNUmakefile) produced by the build = as they will live in the Build/ output directories.=20 > Also with this line.. > "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$$$/,\"\"); print}" = infile.in > > outfile.out > .. I get exactly the same error and output (multiple dollars are = stripped > down to a single one) >=20 > Tried to get some more details of how the macros work by looking at = python > scripts. > All I see is that only fixed macros are supported like ${s_base} or > $(OUTPUT_DIR). > I couldn't find a way to actually espace the $(xx) sequence at all. >=20 > Here are some more tries to figure out how the $ is processed: >=20 > $() fails because no macro name is set but prints $() into the = makefile, > $($) fails because second $ is unknown and prints $($) into the = makefile, > ${} fails because { is no valid character but prints ${} into the = makefile, > $ or $$ or $$$ or $$$$ .. fails because next character "/" invalid and > prints a single $ into the makefile. >=20 > It seems there is one exception that multiple $ signs will not be = printed > 1:1 into the makefile.=20 > All other tries were printed correctly into the makefile. > So if $$ would be printed 1:1, too, it should work as I expected. > Unfortunately I don't get $$ with anyone of them. >=20 > Guess there is no support for any escape sequence yet, right? Sorry I was just taking a guess. It looks like an issue in how the file = is parsed hopefully the maintainer can chime in with more details.=20 Short term can you make it work if you pass the pattern in via a file = (awk -f)? You should be able to use the existing macros to point to a = file checked into your source tree.=20 Thanks, Andrew Fish > Any idea to get this working and/or in case $$ should work in > build_rules.txt, would you plan to fix this? >=20 > Best Regards, > Peter Kirmeier >=20 > PS: Maybe a quick and simple solution could be to add a predefined = $(DOLLAR) > marco or anything like that into the python scripts? >=20 >=20 > -----Urspr=C3=BCngliche Nachricht----- > Von: edk2-devel [mailto:edk2-devel-bounces@ml01.01.org] Im Auftrag von > Andrew Fish > Gesendet: Montag, 12. Dezember 2016 18:27 > An: peter.kirmeier@ts.fujitsu.com > Cc: edk2-devel@lists.01.org > Betreff: Re: [edk2] $ escape sequence at build_rule.txt >=20 >=20 >> On Dec 12, 2016, at 2:31 AM, peter.kirmeier@ts.fujitsu.com wrote: >>=20 >> Hi all, >>=20 >> I tried to add a AWK replacement into the build_rules to become part = of > the generated makefiles: >>=20 >> >> "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" = infile.in >> outfile.out >>=20 >> Unfortunately I don't get it, how the dollar sign can be escaped to = the > doubled $$ which is used by make for placing a single $ at the = command. >>=20 >> Can someone help? >>=20 >=20 > Peter, >=20 > Do you think the build_rules.txt parse is removing one of the $? I'm = not > sure if this will work but what happens if you use 4 $?=20 >=20 > What do you see in the generated makefile? >=20 > Thanks, >=20 > Andrew Fish >=20 >> Thanks, >> Peter >>=20 >> --- >> Peter Kirmeier >> Senior Firmware Developer >> Client Computing Devices Engineering >>=20 >> FUJITSU >> Buergermeister-Ulrich-Strasse 100, 86199 Augsburg, Germany >> Tel.: +49 (821) 804 3227 >> Fax: +49 (821) 804 83227 >> E-mail: peter.kirmeier@ts.fujitsu.com >> Web: ts.fujitsu.com >> Company: Fujitsu Technology Solutions GmbH / ts.fujitsu.com/imprint >> This communication contains information that is confidential, = proprietary > in nature and/or privileged. It is for the exclusive use of the = intended > recipient(s). If you are not the intended recipient(s) or the person > responsible for delivering it to the intended recipient(s), please = note that > any form of dissemination, distribution or copying of this = communication is > strictly prohibited and may be unlawful. If you have received this > communication in error, please immediately notify the sender and = delete the > original communication. Thank you for your cooperation. >> Please be advised that neither Fujitsu, its affiliates, its employees = or > agents accept liability for any errors, omissions or damages caused by > delays of receipt or by any virus infection in this message or its > attachments, or which may otherwise arise as a result of this e-mail > transmission. >>=20 >> _______________________________________________ >> edk2-devel mailing list >> edk2-devel@lists.01.org >> https://lists.01.org/mailman/listinfo/edk2-devel >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel >=20