All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: dev@dpdk.org
Cc: Ali Alnubani <alialnu@nvidia.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: [dpdk-dev] [PATCH 3/3] buildtools: use build subdirectory for temporary files
Date: Tue, 26 Jan 2021 01:12:50 +0300	[thread overview]
Message-ID: <20210125221251.19147-4-dmitry.kozliuk@gmail.com> (raw)
In-Reply-To: <20210125221251.19147-1-dmitry.kozliuk@gmail.com>

Use current build directory as base for temporary directories,
so that all build files are isolated there.

Fixes: caaca1ec6a8e ("buildtools: support object file extraction for Windows")

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
Thomas asked to send this as a follow-up before regression has been
noticed, may be squashed with commit mentioned above or applied on its own.

 buildtools/gen-pmdinfo-cfile.py | 4 ++--
 buildtools/meson.build          | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/buildtools/gen-pmdinfo-cfile.py b/buildtools/gen-pmdinfo-cfile.py
index c60ecd7f6..a4e080199 100644
--- a/buildtools/gen-pmdinfo-cfile.py
+++ b/buildtools/gen-pmdinfo-cfile.py
@@ -7,8 +7,8 @@
 import sys
 import tempfile
 
-_, ar, archive, output, *pmdinfogen = sys.argv
-with tempfile.TemporaryDirectory() as temp:
+_, tmp_root, ar, archive, output, *pmdinfogen = sys.argv
+with tempfile.TemporaryDirectory(dir=tmp_root) as temp:
     proc = subprocess.run(
         # Don't use "ar p", because its output is corrupted on Windows.
         [ar, "xv", os.path.abspath(archive)], stdout=subprocess.PIPE, check=True, cwd=temp
diff --git a/buildtools/meson.build b/buildtools/meson.build
index 0a2e91a7b..9c9347457 100644
--- a/buildtools/meson.build
+++ b/buildtools/meson.build
@@ -18,7 +18,7 @@ map_to_win_cmd = py3 + files('map_to_win.py')
 sphinx_wrapper = py3 + files('call-sphinx-build.py')
 
 # select library and object file format
-pmdinfo = py3 + files('gen-pmdinfo-cfile.py')
+pmdinfo = py3 + files('gen-pmdinfo-cfile.py') + [meson.current_build_dir()]
 pmdinfogen = py3 + files('pmdinfogen.py')
 if host_machine.system() == 'windows'
 	if cc.get_id() == 'gcc'
-- 
2.29.2


  parent reply	other threads:[~2021-01-25 22:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 22:12 [dpdk-dev] [PATCH 0/3] pmdinfogen fixes Dmitry Kozlyuk
2021-01-25 22:12 ` [dpdk-dev] [PATCH 1/3] pmdinfogen: fix build with pyelftools < 0.24 Dmitry Kozlyuk
2021-01-25 22:12 ` [dpdk-dev] [PATCH 2/3] buildtools: fix archive extraction for Python 3.5 Dmitry Kozlyuk
2021-01-25 22:12 ` Dmitry Kozlyuk [this message]
2021-01-25 23:44 ` [dpdk-dev] [PATCH 0/3] pmdinfogen fixes Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210125221251.19147-4-dmitry.kozliuk@gmail.com \
    --to=dmitry.kozliuk@gmail.com \
    --cc=alialnu@nvidia.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.