* $ escape sequence at build_rule.txt
@ 2016-12-12 10:31 peter.kirmeier
2016-12-12 17:27 ` Andrew Fish
0 siblings, 1 reply; 7+ messages in thread
From: peter.kirmeier @ 2016-12-12 10:31 UTC (permalink / raw)
To: edk2-devel@lists.01.org
Hi all,
I tried to add a AWK replacement into the build_rules to become part of the generated makefiles:
<Command>
"$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in > outfile.out
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.
Can someone help?
Thanks,
Peter
---
Peter Kirmeier
Senior Firmware Developer
Client Computing Devices Engineering
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: $ escape sequence at build_rule.txt
2016-12-12 10:31 $ escape sequence at build_rule.txt peter.kirmeier
@ 2016-12-12 17:27 ` Andrew Fish
2016-12-12 21:49 ` Peter Kirmeier
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Fish @ 2016-12-12 17:27 UTC (permalink / raw)
To: peter.kirmeier@ts.fujitsu.com; +Cc: edk2-devel@lists.01.org
> On Dec 12, 2016, at 2:31 AM, peter.kirmeier@ts.fujitsu.com wrote:
>
> Hi all,
>
> I tried to add a AWK replacement into the build_rules to become part of the generated makefiles:
>
> <Command>
> "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in > outfile.out
>
> 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.
>
> Can someone help?
>
Peter,
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 $?
What do you see in the generated makefile?
Thanks,
Andrew Fish
> Thanks,
> Peter
>
> ---
> Peter Kirmeier
> Senior Firmware Developer
> Client Computing Devices Engineering
>
> 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.
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: $ escape sequence at build_rule.txt
2016-12-12 17:27 ` Andrew Fish
@ 2016-12-12 21:49 ` Peter Kirmeier
2016-12-12 23:25 ` Andrew Fish
0 siblings, 1 reply; 7+ messages in thread
From: Peter Kirmeier @ 2016-12-12 21:49 UTC (permalink / raw)
To: 'Andrew Fish', peter.kirmeier; +Cc: 'edk2-devel@lists.01.org'
Hi Andrew,
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³ltiges Zeichen "/"
in Makro
(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
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)
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.
Here are some more tries to figure out how the $ is processed:
$() 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.
It seems there is one exception that multiple $ signs will not be printed
1:1 into the makefile.
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.
Guess there is no support for any escape sequence yet, right?
Any idea to get this working and/or in case $$ should work in
build_rules.txt, would you plan to fix this?
Best Regards,
Peter Kirmeier
PS: Maybe a quick and simple solution could be to add a predefined $(DOLLAR)
marco or anything like that into the python scripts?
-----Ursprüngliche 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
> On Dec 12, 2016, at 2:31 AM, peter.kirmeier@ts.fujitsu.com wrote:
>
> Hi all,
>
> I tried to add a AWK replacement into the build_rules to become part of
the generated makefiles:
>
> <Command>
> "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in
> outfile.out
>
> 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.
>
> Can someone help?
>
Peter,
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 $?
What do you see in the generated makefile?
Thanks,
Andrew Fish
> Thanks,
> Peter
>
> ---
> Peter Kirmeier
> Senior Firmware Developer
> Client Computing Devices Engineering
>
> 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.
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: $ escape sequence at build_rule.txt
2016-12-12 21:49 ` Peter Kirmeier
@ 2016-12-12 23:25 ` Andrew Fish
2016-12-14 7:02 ` peter.kirmeier
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Fish @ 2016-12-12 23:25 UTC (permalink / raw)
To: Peter Kirmeier; +Cc: peter.kirmeier, edk2-devel@lists.01.org
> On Dec 12, 2016, at 1:49 PM, Peter Kirmeier <topeterk@freenet.de> wrote:
>
> Hi Andrew,
>
> 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³ltiges Zeichen "/"
> in Makro
> (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
>
Peter,
You can also looks at the makefile (GNUmakefile) produced by the build as they will live in the Build/ output directories.
> 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)
>
> 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.
>
> Here are some more tries to figure out how the $ is processed:
>
> $() 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.
>
> It seems there is one exception that multiple $ signs will not be printed
> 1:1 into the makefile.
> 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.
>
> 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.
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.
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?
>
> Best Regards,
> Peter Kirmeier
>
> PS: Maybe a quick and simple solution could be to add a predefined $(DOLLAR)
> marco or anything like that into the python scripts?
>
>
> -----Ursprüngliche 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
>
>
>> On Dec 12, 2016, at 2:31 AM, peter.kirmeier@ts.fujitsu.com wrote:
>>
>> Hi all,
>>
>> I tried to add a AWK replacement into the build_rules to become part of
> the generated makefiles:
>>
>> <Command>
>> "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}" infile.in
>> outfile.out
>>
>> 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.
>>
>> Can someone help?
>>
>
> Peter,
>
> 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 $?
>
> What do you see in the generated makefile?
>
> Thanks,
>
> Andrew Fish
>
>> Thanks,
>> Peter
>>
>> ---
>> Peter Kirmeier
>> Senior Firmware Developer
>> Client Computing Devices Engineering
>>
>> 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.
>>
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: $ escape sequence at build_rule.txt
2016-12-12 23:25 ` Andrew Fish
@ 2016-12-14 7:02 ` peter.kirmeier
2016-12-14 7:06 ` Gao, Liming
0 siblings, 1 reply; 7+ messages in thread
From: peter.kirmeier @ 2016-12-14 7:02 UTC (permalink / raw)
To: afish@apple.com, Yonghong Zhu, Liming Gao; +Cc: edk2-devel@lists.01.org
Hi Andrew,
in the meantime I will work around this issue by using a script file as AWK input, so the command is not part of build_rules.txt.
Thanks for your help.
Dear Yonghong, Liming,
first I thought that my issue came by myself (not knowing how to escape the dollar sign at build_rules.txt).
But now I think this is a real issue of the build tools and that build_rules.txt doesn't have the capability of escaping the $ sign.
Therefore I hope that you could fix the tools accordingly.
For example, by adding an "escape sequence" for the $ sign (or at least by adding a predefined macro like "$(DOLLAR)" which expands to "$").
Thanks,
Peter
-----Original Message-----
From: afish@apple.com [mailto:afish@apple.com]
Sent: Tuesday, December 13, 2016 12:26 AM
To: Peter Kirmeier
Cc: Kirmeier, Peter; edk2-devel@lists.01.org
Subject: Re: [edk2] $ escape sequence at build_rule.txt
> On Dec 12, 2016, at 1:49 PM, Peter Kirmeier <topeterk@freenet.de> wrote:
>
> Hi Andrew,
>
> 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³ltiges Zeichen "/"
> in Makro
> (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
>
Peter,
You can also looks at the makefile (GNUmakefile) produced by the build as they will live in the Build/ output directories.
> 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)
>
> 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.
>
> Here are some more tries to figure out how the $ is processed:
>
> $() 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.
>
> It seems there is one exception that multiple $ signs will not be
> printed
> 1:1 into the makefile.
> 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.
>
> 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.
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.
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?
>
> Best Regards,
> Peter Kirmeier
>
> PS: Maybe a quick and simple solution could be to add a predefined
> $(DOLLAR) marco or anything like that into the python scripts?
>
>
> -----Ursprüngliche 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
>
>
>> On Dec 12, 2016, at 2:31 AM, peter.kirmeier@ts.fujitsu.com wrote:
>>
>> Hi all,
>>
>> I tried to add a AWK replacement into the build_rules to become part
>> of
> the generated makefiles:
>>
>> <Command>
>> "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}"
>> infile.in outfile.out
>>
>> 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.
>>
>> Can someone help?
>>
>
> Peter,
>
> 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 $?
>
> What do you see in the generated makefile?
>
> Thanks,
>
> Andrew Fish
>
>> Thanks,
>> Peter
>>
>> ---
>> Peter Kirmeier
>> Senior Firmware Developer
>> Client Computing Devices Engineering
>>
>> 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.
>>
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: $ escape sequence at build_rule.txt
2016-12-14 7:02 ` peter.kirmeier
@ 2016-12-14 7:06 ` Gao, Liming
2016-12-15 6:48 ` peter.kirmeier
0 siblings, 1 reply; 7+ messages in thread
From: Gao, Liming @ 2016-12-14 7:06 UTC (permalink / raw)
To: peter.kirmeier@ts.fujitsu.com, afish@apple.com, Zhu, Yonghong
Cc: edk2-devel@lists.01.org
Peter:
Thanks for your report this issue. Could you report it in bugzilla (bugzilla.tianocore.org)? We will follow up.
Thanks
Liming
> -----Original Message-----
> From: peter.kirmeier@ts.fujitsu.com [mailto:peter.kirmeier@ts.fujitsu.com]
> Sent: Wednesday, December 14, 2016 3:03 PM
> To: afish@apple.com; Zhu, Yonghong <yonghong.zhu@intel.com>; Gao,
> Liming <liming.gao@intel.com>
> Cc: edk2-devel@lists.01.org <edk2-devel@ml01.01.org>
> Subject: RE: [edk2] $ escape sequence at build_rule.txt
>
> Hi Andrew,
>
> in the meantime I will work around this issue by using a script file as AWK
> input, so the command is not part of build_rules.txt.
> Thanks for your help.
>
> Dear Yonghong, Liming,
>
> first I thought that my issue came by myself (not knowing how to escape the
> dollar sign at build_rules.txt).
> But now I think this is a real issue of the build tools and that build_rules.txt
> doesn't have the capability of escaping the $ sign.
> Therefore I hope that you could fix the tools accordingly.
> For example, by adding an "escape sequence" for the $ sign (or at least by
> adding a predefined macro like "$(DOLLAR)" which expands to "$").
>
> Thanks,
> Peter
>
> -----Original Message-----
> From: afish@apple.com [mailto:afish@apple.com]
> Sent: Tuesday, December 13, 2016 12:26 AM
> To: Peter Kirmeier
> Cc: Kirmeier, Peter; edk2-devel@lists.01.org
> Subject: Re: [edk2] $ escape sequence at build_rule.txt
>
>
> > On Dec 12, 2016, at 1:49 PM, Peter Kirmeier <topeterk@freenet.de> wrote:
> >
> > Hi Andrew,
> >
> > 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³ltiges Zeichen "/"
> > in Makro
> > (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
> >
>
> Peter,
>
> You can also looks at the makefile (GNUmakefile) produced by the build as
> they will live in the Build/ output directories.
>
> > 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)
> >
> > 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.
> >
> > Here are some more tries to figure out how the $ is processed:
> >
> > $() 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.
> >
> > It seems there is one exception that multiple $ signs will not be
> > printed
> > 1:1 into the makefile.
> > 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.
> >
> > 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.
>
> 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.
>
> 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?
> >
> > Best Regards,
> > Peter Kirmeier
> >
> > PS: Maybe a quick and simple solution could be to add a predefined
> > $(DOLLAR) marco or anything like that into the python scripts?
> >
> >
> > -----Ursprüngliche 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
> >
> >
> >> On Dec 12, 2016, at 2:31 AM, peter.kirmeier@ts.fujitsu.com wrote:
> >>
> >> Hi all,
> >>
> >> I tried to add a AWK replacement into the build_rules to become part
> >> of
> > the generated makefiles:
> >>
> >> <Command>
> >> "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}"
> >> infile.in outfile.out
> >>
> >> 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.
> >>
> >> Can someone help?
> >>
> >
> > Peter,
> >
> > 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 $?
> >
> > What do you see in the generated makefile?
> >
> > Thanks,
> >
> > Andrew Fish
> >
> >> Thanks,
> >> Peter
> >>
> >> ---
> >> Peter Kirmeier
> >> Senior Firmware Developer
> >> Client Computing Devices Engineering
> >>
> >> 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.
> >>
> >> _______________________________________________
> >> edk2-devel mailing list
> >> edk2-devel@lists.01.org
> >> https://lists.01.org/mailman/listinfo/edk2-devel
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: $ escape sequence at build_rule.txt
2016-12-14 7:06 ` Gao, Liming
@ 2016-12-15 6:48 ` peter.kirmeier
0 siblings, 0 replies; 7+ messages in thread
From: peter.kirmeier @ 2016-12-15 6:48 UTC (permalink / raw)
To: Gao, Liming; +Cc: edk2-devel@lists.01.org, Zhu, Yonghong
Hi Liming,
I filed a bug report and assigned it to you initially.
Hopefully I did it right because BugZilla was a pain to me in entering this issue :)
Best Regards,
Peter
Reference: https://bugzilla.tianocore.org/show_bug.cgi?id=297
-----Original Message-----
From: Gao, Liming [mailto:liming.gao@intel.com]
Sent: Wednesday, December 14, 2016 8:06 AM
To: Kirmeier, Peter; afish@apple.com; Zhu, Yonghong
Cc: edk2-devel@lists.01.org
Subject: RE: [edk2] $ escape sequence at build_rule.txt
Peter:
Thanks for your report this issue. Could you report it in bugzilla (bugzilla.tianocore.org)? We will follow up.
Thanks
Liming
> -----Original Message-----
> From: peter.kirmeier@ts.fujitsu.com
> [mailto:peter.kirmeier@ts.fujitsu.com]
> Sent: Wednesday, December 14, 2016 3:03 PM
> To: afish@apple.com; Zhu, Yonghong <yonghong.zhu@intel.com>; Gao,
> Liming <liming.gao@intel.com>
> Cc: edk2-devel@lists.01.org <edk2-devel@ml01.01.org>
> Subject: RE: [edk2] $ escape sequence at build_rule.txt
>
> Hi Andrew,
>
> in the meantime I will work around this issue by using a script file
> as AWK input, so the command is not part of build_rules.txt.
> Thanks for your help.
>
> Dear Yonghong, Liming,
>
> first I thought that my issue came by myself (not knowing how to
> escape the dollar sign at build_rules.txt).
> But now I think this is a real issue of the build tools and that
> build_rules.txt doesn't have the capability of escaping the $ sign.
> Therefore I hope that you could fix the tools accordingly.
> For example, by adding an "escape sequence" for the $ sign (or at
> least by adding a predefined macro like "$(DOLLAR)" which expands to "$").
>
> Thanks,
> Peter
>
> -----Original Message-----
> From: afish@apple.com [mailto:afish@apple.com]
> Sent: Tuesday, December 13, 2016 12:26 AM
> To: Peter Kirmeier
> Cc: Kirmeier, Peter; edk2-devel@lists.01.org
> Subject: Re: [edk2] $ escape sequence at build_rule.txt
>
>
> > On Dec 12, 2016, at 1:49 PM, Peter Kirmeier <topeterk@freenet.de> wrote:
> >
> > Hi Andrew,
> >
> > 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³ltiges Zeichen "/"
> > in Makro
> > (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
> >
>
> Peter,
>
> You can also looks at the makefile (GNUmakefile) produced by the build
> as they will live in the Build/ output directories.
>
> > 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)
> >
> > 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.
> >
> > Here are some more tries to figure out how the $ is processed:
> >
> > $() 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.
> >
> > It seems there is one exception that multiple $ signs will not be
> > printed
> > 1:1 into the makefile.
> > 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.
> >
> > 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.
>
> 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.
>
> 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?
> >
> > Best Regards,
> > Peter Kirmeier
> >
> > PS: Maybe a quick and simple solution could be to add a predefined
> > $(DOLLAR) marco or anything like that into the python scripts?
> >
> >
> > -----Ursprüngliche 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
> >
> >
> >> On Dec 12, 2016, at 2:31 AM, peter.kirmeier@ts.fujitsu.com wrote:
> >>
> >> Hi all,
> >>
> >> I tried to add a AWK replacement into the build_rules to become
> >> part of
> > the generated makefiles:
> >>
> >> <Command>
> >> "$(TOOLS_DIR)\gawk.exe" "NF{gsub(/ *\\$$/,\"\"); print}"
> >> infile.in outfile.out
> >>
> >> 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.
> >>
> >> Can someone help?
> >>
> >
> > Peter,
> >
> > 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 $?
> >
> > What do you see in the generated makefile?
> >
> > Thanks,
> >
> > Andrew Fish
> >
> >> Thanks,
> >> Peter
> >>
> >> ---
> >> Peter Kirmeier
> >> Senior Firmware Developer
> >> Client Computing Devices Engineering
> >>
> >> 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.
> >>
> >> _______________________________________________
> >> edk2-devel mailing list
> >> edk2-devel@lists.01.org
> >> https://lists.01.org/mailman/listinfo/edk2-devel
> >
> > _______________________________________________
> > edk2-devel mailing list
> > edk2-devel@lists.01.org
> > https://lists.01.org/mailman/listinfo/edk2-devel
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-12-15 6:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-12 10:31 $ escape sequence at build_rule.txt peter.kirmeier
2016-12-12 17:27 ` Andrew Fish
2016-12-12 21:49 ` Peter Kirmeier
2016-12-12 23:25 ` Andrew Fish
2016-12-14 7:02 ` peter.kirmeier
2016-12-14 7:06 ` Gao, Liming
2016-12-15 6:48 ` peter.kirmeier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox