* [PATCH v2 1/1] INF Spec: Add file dependency to [Sources] syntax
@ 2020-03-30 16:17 PierreGondois
2020-03-30 16:20 ` PierreGondois
0 siblings, 1 reply; 2+ messages in thread
From: PierreGondois @ 2020-03-30 16:17 UTC (permalink / raw)
To: devel; +Cc: Pierre Gondois, liming.gao, sami.mujawar, nd
From: Pierre Gondois <Pierre.Gondois@arm.com>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2646
When building an edk2 module, a C file was including
a .hex file generated by the compilation of an ASL file.
To describe this dependency between an ASL file and
a C file, the edk2 patch,
- named "BaseTools: Build ASL files before C files",
- discussed at: https://edk2.groups.io/g/devel/message/52550
has been created.
This patch allows to establish build dependencies in the
[Sources] section, between files that are not of the same
language.
E.g.:
[Sources]
FileName1.X
FileName2.Y : FileName1.X
FileName3.Z : FileName1.X FileName2.Y
Here:
* FileName1.X will be built prior to FileName2.Y.
* FileName1.X and FileName2.Y will be built prior to
FileName3.Z.
This patch updates the Inf specification accordingly.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
The changes can be seen at https://github.com/PierreARM/edk2-InfSpecification/tree/Bugzilla_2646_Enable_Build_Dependencies_v2
Notes:
v2:
- Correct the bugzilla ticket number from 2464 to 2646
2_inf_overview/25_[sources]_section.md | 12 ++++++++++++
3_edk_ii_inf_file_format/32_component_inf_definition.md | 3 +++
3_edk_ii_inf_file_format/39_[sources]_sections.md | 6 ++++--
README.md | 1 +
4 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/2_inf_overview/25_[sources]_section.md b/2_inf_overview/25_[sources]_section.md
index 54757e61e37268eed293a5288e607cf2c7cfacf6..5b9f0a8395ef2be4497d99197dc695625d841830 100644
--- a/2_inf_overview/25_[sources]_section.md
+++ b/2_inf_overview/25_[sources]_section.md
@@ -2,6 +2,7 @@
2.5 [Sources] Section
Copyright (c) 2007-2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2020, ARM Limited. All rights reserved.<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without
@@ -94,6 +95,17 @@ The following is an example for sources sections.
```
+The following example depicts the syntax to establish dependencies between
+files of different source types. As shown in the example below, Dsdt.asl will
+be compiled before DadtHandler.c:
+
+```ini
+[Sources.common]
+ DsdtHandler.c : Dsdt.asl
+ DsdtHandler.h
+ Dsdt.asl
+```
+
All Unicode files must be listed in the source section. If a Unicode file,
`A.uni`, has the statement: `#include B.uni`, and `B.uni` has a statement:
`#include C.uni`, both `B.uni` and `C.uni` files must be listed in the INF
diff --git a/3_edk_ii_inf_file_format/32_component_inf_definition.md b/3_edk_ii_inf_file_format/32_component_inf_definition.md
index 164771cb4cfff6e81fbf762a67ff741c190cecde..d776714c24c0baf2348f53dc2576c9feb6f3cb5e 100644
--- a/3_edk_ii_inf_file_format/32_component_inf_definition.md
+++ b/3_edk_ii_inf_file_format/32_component_inf_definition.md
@@ -2,6 +2,7 @@
3.2 Component INF Definition
Copyright (c) 2007-2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2020, ARM Limited. All rights reserved.<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without
@@ -133,6 +134,8 @@ The following are common definitions used by multiple section types.
<Eq> ::= <TS> "=" <TS>
<FieldSeparator> ::= "|"
<FS> ::= <TS> <FieldSeparator> <TS>
+<SrcDepSeperator> ::= ":"
+<DepS> ::= <TS> <SrcDepSeperator> <TS>
<Wildcard> ::= "*"
<CommaSpace> ::= "," <Space>*
<Cs> ::= "," <Space>*
diff --git a/3_edk_ii_inf_file_format/39_[sources]_sections.md b/3_edk_ii_inf_file_format/39_[sources]_sections.md
index 810995df26ba409ca2cf3ebe6238aa5d55cf81f1..ac966425101fd44a57b09d36f95a0f732eab1c59 100644
--- a/3_edk_ii_inf_file_format/39_[sources]_sections.md
+++ b/3_edk_ii_inf_file_format/39_[sources]_sections.md
@@ -2,6 +2,7 @@
3.9 [Sources] Sections
Copyright (c) 2007-2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2020, ARM Limited. All rights reserved.<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without
@@ -74,7 +75,8 @@ This section is not valid for a generated "As Built" binary INF file.
<Options> ::= <FS> [<Family>] [<opt1>]
<opt1> ::= <FS> [<TagName>] [<opt2>]
<opt2> ::= <FS> [<ToolCode>] [<opt3>]
-<opt3> ::= <FS> [<FeatureFlagExpress>]
+<opt3> ::= <FS> [<FeatureFlagExpress>] [<opt4>]
+<opt4> ::= <DepS> <FileNameDependency>+
<Family> ::= {"MSFT"} {"GCC"} {"INTEL"} {<Wildcard>}
<TagName> ::= {<ToolWord>} {"*"}
<ToolCode> ::= _CommandCode_
@@ -83,7 +85,7 @@ This section is not valid for a generated "As Built" binary INF file.
#### Parameters
-**_Filename_**
+**_Filename_, _FileNameDependency_**
Paths listed in the filename elements of the `[Sources]` section must be
relative to the directory the INF file resides in. Use of "..", "." and "../"
diff --git a/README.md b/README.md
index 60fba19fd67fd8d3dd33199de23f9bfe20aea7c9..4f771fc0f6e4ff516be95b1879d58329ab3bbecc 100644
--- a/README.md
+++ b/README.md
@@ -203,3 +203,4 @@ Copyright (c) 2007-2017, Intel Corporation. All rights reserved.
| | [#1162](https://bugzilla.tianocore.org/show_bug.cgi?id=1162) Correct the item in Table 1 to align with 3.4 section | |
| 1.28 | [#1453](https://bugzilla.tianocore.org/show_bug.cgi?id=1453) Update INF spec to remove EDK related contents | Mar 2019 |
| 1.29 | [#1952](https://bugzilla.tianocore.org/show_bug.cgi?id=1952) Add new MODULE_TYPE HOST_APPLICATION | July 2019 |
+| | [#2646](https://bugzilla.tianocore.org/show_bug.cgi?id=2646) Add file dependency to [Sources] syntax | |
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2 1/1] INF Spec: Add file dependency to [Sources] syntax
2020-03-30 16:17 [PATCH v2 1/1] INF Spec: Add file dependency to [Sources] syntax PierreGondois
@ 2020-03-30 16:20 ` PierreGondois
0 siblings, 0 replies; 2+ messages in thread
From: PierreGondois @ 2020-03-30 16:20 UTC (permalink / raw)
To: Pierre Gondois, devel@edk2.groups.io
Cc: liming.gao@intel.com, Sami Mujawar, bob.c.feng@intel.com, nd
The Bugzilla ticket number was erroneous in the v1. The v1 is available at: https://edk2.groups.io/g/devel/message/56658
Regards,
Pierre
-----Original Message-----
From: PierreGondois <pierre.gondois@arm.com>
Sent: 30 March 2020 17:17
To: devel@edk2.groups.io
Cc: Pierre Gondois <Pierre.Gondois@arm.com>; liming.gao@intel.com; Sami Mujawar <Sami.Mujawar@arm.com>; nd <nd@arm.com>
Subject: [PATCH v2 1/1] INF Spec: Add file dependency to [Sources] syntax
From: Pierre Gondois <Pierre.Gondois@arm.com>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2646
When building an edk2 module, a C file was including a .hex file generated by the compilation of an ASL file.
To describe this dependency between an ASL file and a C file, the edk2 patch,
- named "BaseTools: Build ASL files before C files",
- discussed at: https://edk2.groups.io/g/devel/message/52550
has been created.
This patch allows to establish build dependencies in the [Sources] section, between files that are not of the same language.
E.g.:
[Sources]
FileName1.X
FileName2.Y : FileName1.X
FileName3.Z : FileName1.X FileName2.Y
Here:
* FileName1.X will be built prior to FileName2.Y.
* FileName1.X and FileName2.Y will be built prior to
FileName3.Z.
This patch updates the Inf specification accordingly.
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
The changes can be seen at https://github.com/PierreARM/edk2-InfSpecification/tree/Bugzilla_2646_Enable_Build_Dependencies_v2
Notes:
v2:
- Correct the bugzilla ticket number from 2464 to 2646
2_inf_overview/25_[sources]_section.md | 12 ++++++++++++
3_edk_ii_inf_file_format/32_component_inf_definition.md | 3 +++
3_edk_ii_inf_file_format/39_[sources]_sections.md | 6 ++++--
README.md | 1 +
4 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/2_inf_overview/25_[sources]_section.md b/2_inf_overview/25_[sources]_section.md
index 54757e61e37268eed293a5288e607cf2c7cfacf6..5b9f0a8395ef2be4497d99197dc695625d841830 100644
--- a/2_inf_overview/25_[sources]_section.md
+++ b/2_inf_overview/25_[sources]_section.md
@@ -2,6 +2,7 @@
2.5 [Sources] Section
Copyright (c) 2007-2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2020, ARM Limited. All rights reserved.<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -94,6 +95,17 @@ The following is an example for sources sections.
```
+The following example depicts the syntax to establish dependencies
+between files of different source types. As shown in the example below,
+Dsdt.asl will be compiled before DadtHandler.c:
+
+```ini
+[Sources.common]
+ DsdtHandler.c : Dsdt.asl
+ DsdtHandler.h
+ Dsdt.asl
+```
+
All Unicode files must be listed in the source section. If a Unicode file, `A.uni`, has the statement: `#include B.uni`, and `B.uni` has a statement:
`#include C.uni`, both `B.uni` and `C.uni` files must be listed in the INF diff --git a/3_edk_ii_inf_file_format/32_component_inf_definition.md b/3_edk_ii_inf_file_format/32_component_inf_definition.md
index 164771cb4cfff6e81fbf762a67ff741c190cecde..d776714c24c0baf2348f53dc2576c9feb6f3cb5e 100644
--- a/3_edk_ii_inf_file_format/32_component_inf_definition.md
+++ b/3_edk_ii_inf_file_format/32_component_inf_definition.md
@@ -2,6 +2,7 @@
3.2 Component INF Definition
Copyright (c) 2007-2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2020, ARM Limited. All rights reserved.<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -133,6 +134,8 @@ The following are common definitions used by multiple section types.
<Eq> ::= <TS> "=" <TS>
<FieldSeparator> ::= "|"
<FS> ::= <TS> <FieldSeparator> <TS>
+<SrcDepSeperator> ::= ":"
+<DepS> ::= <TS> <SrcDepSeperator> <TS>
<Wildcard> ::= "*"
<CommaSpace> ::= "," <Space>*
<Cs> ::= "," <Space>*
diff --git a/3_edk_ii_inf_file_format/39_[sources]_sections.md b/3_edk_ii_inf_file_format/39_[sources]_sections.md
index 810995df26ba409ca2cf3ebe6238aa5d55cf81f1..ac966425101fd44a57b09d36f95a0f732eab1c59 100644
--- a/3_edk_ii_inf_file_format/39_[sources]_sections.md
+++ b/3_edk_ii_inf_file_format/39_[sources]_sections.md
@@ -2,6 +2,7 @@
3.9 [Sources] Sections
Copyright (c) 2007-2019, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2020, ARM Limited. All rights reserved.<BR>
Redistribution and use in source (original document form) and 'compiled'
forms (converted to PDF, epub, HTML and other formats) with or without @@ -74,7 +75,8 @@ This section is not valid for a generated "As Built" binary INF file.
<Options> ::= <FS> [<Family>] [<opt1>]
<opt1> ::= <FS> [<TagName>] [<opt2>]
<opt2> ::= <FS> [<ToolCode>] [<opt3>]
-<opt3> ::= <FS> [<FeatureFlagExpress>]
+<opt3> ::= <FS> [<FeatureFlagExpress>] [<opt4>]
+<opt4> ::= <DepS> <FileNameDependency>+
<Family> ::= {"MSFT"} {"GCC"} {"INTEL"} {<Wildcard>}
<TagName> ::= {<ToolWord>} {"*"}
<ToolCode> ::= _CommandCode_
@@ -83,7 +85,7 @@ This section is not valid for a generated "As Built" binary INF file.
#### Parameters
-**_Filename_**
+**_Filename_, _FileNameDependency_**
Paths listed in the filename elements of the `[Sources]` section must be relative to the directory the INF file resides in. Use of "..", "." and "../"
diff --git a/README.md b/README.md
index 60fba19fd67fd8d3dd33199de23f9bfe20aea7c9..4f771fc0f6e4ff516be95b1879d58329ab3bbecc 100644
--- a/README.md
+++ b/README.md
@@ -203,3 +203,4 @@ Copyright (c) 2007-2017, Intel Corporation. All rights reserved.
| | [#1162](https://bugzilla.tianocore.org/show_bug.cgi?id=1162) Correct the item in Table 1 to align with 3.4 section | |
| 1.28 | [#1453](https://bugzilla.tianocore.org/show_bug.cgi?id=1453) Update INF spec to remove EDK related contents | Mar 2019 |
| 1.29 | [#1952](https://bugzilla.tianocore.org/show_bug.cgi?id=1952) Add new MODULE_TYPE HOST_APPLICATION | July 2019 |
+| | [#2646](https://bugzilla.tianocore.org/show_bug.cgi?id=2646) Add file dependency to [Sources] syntax | |
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-30 16:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-30 16:17 [PATCH v2 1/1] INF Spec: Add file dependency to [Sources] syntax PierreGondois
2020-03-30 16:20 ` PierreGondois
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox