DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 23.07 0/2] Minor meson build improvements
@ 2023-03-10 11:11 Bruce Richardson
  2023-03-10 11:11 ` [PATCH 23.07 1/2] build: fix case of project language name Bruce Richardson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Bruce Richardson @ 2023-03-10 11:11 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

While experimenting with "muon" [1] as a replacement for meson, the
muon tool flagged a few issues that could do with being cleaned up
in our meson.build files. While currently muon is not in a position
to configure a DPDK build, it's not that far away from being able to
do so, so may be worth keeping an eye on it future. (Most
interestingly, it does contain a "muon fmt" tool for automatically
formatting meson.build files).

Marking these as for next release as it's late in the 23.03 cycle
as there is no point in taking a risk on these patches for such
minor issues.

[1] https://github.com/annacrombie/muon

Bruce Richardson (2):
  build: fix case of project language name
  build: explicitly track fil paths in current directory

 app/test/meson.build              | 2 +-
 buildtools/pkg-config/meson.build | 2 +-
 meson.build                       | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

--
2.37.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 23.07 1/2] build: fix case of project language name
  2023-03-10 11:11 [PATCH 23.07 0/2] Minor meson build improvements Bruce Richardson
@ 2023-03-10 11:11 ` Bruce Richardson
  2023-03-13 23:50   ` Tyler Retzlaff
  2023-03-10 11:11 ` [PATCH 23.07 2/2] build: explicitly track file paths in current directory Bruce Richardson
  2023-05-24 20:24 ` [PATCH 23.07 0/2] Minor meson build improvements Thomas Monjalon
  2 siblings, 1 reply; 6+ messages in thread
From: Bruce Richardson @ 2023-03-10 11:11 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

According to the meson manual [1], the project language should be given
as 'c', rather than 'C' in the initial "project" function call. While
meson itself does not complain about this, the "muon" project, which
attempts to re-implement meson in C, does complain.

/home/bruce/dpdk/meson.build:4:17: error 'C' is not a valid language
  4 | project('DPDK', 'C',
                      ^

[1] https://mesonbuild.com/Reference-manual_functions.html#project

Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja builds")

Signed-off-by: Bruce richardson <bruce.richardson@intel.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index f91d652bc5..992ca91e88 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017-2019 Intel Corporation
 
-project('DPDK', 'C',
+project('DPDK', 'c',
         # Get version number from file.
         # Fallback to "more" for Windows compatibility.
         version: run_command(find_program('cat', 'more'),
-- 
2.37.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 23.07 2/2] build: explicitly track file paths in current directory
  2023-03-10 11:11 [PATCH 23.07 0/2] Minor meson build improvements Bruce Richardson
  2023-03-10 11:11 ` [PATCH 23.07 1/2] build: fix case of project language name Bruce Richardson
@ 2023-03-10 11:11 ` Bruce Richardson
  2023-03-13 23:50   ` Tyler Retzlaff
  2023-05-24 20:24 ` [PATCH 23.07 0/2] Minor meson build improvements Thomas Monjalon
  2 siblings, 1 reply; 6+ messages in thread
From: Bruce Richardson @ 2023-03-10 11:11 UTC (permalink / raw)
  To: dev; +Cc: Bruce Richardson

To ensure proper path tracking for files being used by the build, the
"files()" function should always be used. While meson currently assumes
that bare filenames passed to commands refer to paths in the current
directory, other reimplementations of meson, e.g. muon, require the
paths to be properly tracked. Therefore, for resiliency, ensure all
paths are specified using "files()".

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/meson.build              | 2 +-
 buildtools/pkg-config/meson.build | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 2db5ccf4ff..94233fafca 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -470,7 +470,7 @@ dpdk_test = executable('dpdk-test',
              driver_install_path),
         install: true)

-has_hugepage = run_command(py3, 'has_hugepage.py', check: true).stdout().strip() != '0'
+has_hugepage = run_command(py3, files('has_hugepage.py'), check: true).stdout().strip() != '0'
 message('hugepage availability: @0@'.format(has_hugepage))

 # some perf tests (eg: memcpy perf autotest)take very long
diff --git a/buildtools/pkg-config/meson.build b/buildtools/pkg-config/meson.build
index 0412883c8f..b36add17e3 100644
--- a/buildtools/pkg-config/meson.build
+++ b/buildtools/pkg-config/meson.build
@@ -56,4 +56,4 @@ This is required for a number of static inline functions in the public headers.'

 # For static linking with dependencies as shared libraries,
 # the internal static libraries must be flagged explicitly.
-run_command(py3, 'set-static-linker-flags.py', check: true)
+run_command(py3, files('set-static-linker-flags.py'), check: true)
--
2.37.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 23.07 1/2] build: fix case of project language name
  2023-03-10 11:11 ` [PATCH 23.07 1/2] build: fix case of project language name Bruce Richardson
@ 2023-03-13 23:50   ` Tyler Retzlaff
  0 siblings, 0 replies; 6+ messages in thread
From: Tyler Retzlaff @ 2023-03-13 23:50 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Fri, Mar 10, 2023 at 11:11:37AM +0000, Bruce Richardson wrote:
> According to the meson manual [1], the project language should be given
> as 'c', rather than 'C' in the initial "project" function call. While
> meson itself does not complain about this, the "muon" project, which
> attempts to re-implement meson in C, does complain.
> 
> /home/bruce/dpdk/meson.build:4:17: error 'C' is not a valid language
>   4 | project('DPDK', 'C',
>                       ^
> 
> [1] https://mesonbuild.com/Reference-manual_functions.html#project
> 
> Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja builds")
> 
> Signed-off-by: Bruce richardson <bruce.richardson@intel.com>
> ---

Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 23.07 2/2] build: explicitly track file paths in current directory
  2023-03-10 11:11 ` [PATCH 23.07 2/2] build: explicitly track file paths in current directory Bruce Richardson
@ 2023-03-13 23:50   ` Tyler Retzlaff
  0 siblings, 0 replies; 6+ messages in thread
From: Tyler Retzlaff @ 2023-03-13 23:50 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

On Fri, Mar 10, 2023 at 11:11:38AM +0000, Bruce Richardson wrote:
> To ensure proper path tracking for files being used by the build, the
> "files()" function should always be used. While meson currently assumes
> that bare filenames passed to commands refer to paths in the current
> directory, other reimplementations of meson, e.g. muon, require the
> paths to be properly tracked. Therefore, for resiliency, ensure all
> paths are specified using "files()".
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Reviewed-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 23.07 0/2] Minor meson build improvements
  2023-03-10 11:11 [PATCH 23.07 0/2] Minor meson build improvements Bruce Richardson
  2023-03-10 11:11 ` [PATCH 23.07 1/2] build: fix case of project language name Bruce Richardson
  2023-03-10 11:11 ` [PATCH 23.07 2/2] build: explicitly track file paths in current directory Bruce Richardson
@ 2023-05-24 20:24 ` Thomas Monjalon
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2023-05-24 20:24 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

10/03/2023 12:11, Bruce Richardson:
> While experimenting with "muon" [1] as a replacement for meson, the
> muon tool flagged a few issues that could do with being cleaned up
> in our meson.build files. While currently muon is not in a position
> to configure a DPDK build, it's not that far away from being able to
> do so, so may be worth keeping an eye on it future. (Most
> interestingly, it does contain a "muon fmt" tool for automatically
> formatting meson.build files).
> 
> Marking these as for next release as it's late in the 23.03 cycle
> as there is no point in taking a risk on these patches for such
> minor issues.
> 
> [1] https://github.com/annacrombie/muon
> 
> Bruce Richardson (2):
>   build: fix case of project language name
>   build: explicitly track fil paths in current directory

Applied, thanks.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-24 20:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-10 11:11 [PATCH 23.07 0/2] Minor meson build improvements Bruce Richardson
2023-03-10 11:11 ` [PATCH 23.07 1/2] build: fix case of project language name Bruce Richardson
2023-03-13 23:50   ` Tyler Retzlaff
2023-03-10 11:11 ` [PATCH 23.07 2/2] build: explicitly track file paths in current directory Bruce Richardson
2023-03-13 23:50   ` Tyler Retzlaff
2023-05-24 20:24 ` [PATCH 23.07 0/2] Minor meson build improvements Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).