All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Peres <martin.peres@mupuf.org>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
	igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t] meson: Allow source location to be configurable
Date: Sun, 28 Feb 2021 12:06:42 +0200	[thread overview]
Message-ID: <4b0ea6a7-92a7-566a-ce32-f8548eb87092@mupuf.org> (raw)
In-Reply-To: <20210227144900.3961632-1-richard.purdie@linuxfoundation.org>



On 27/02/2021 16:49, Richard Purdie wrote:
> Hardcoding a build source path into a binary when cross compiling isn't
> appropriate and breaks build reproducibility. Allow the srcdir to be
> specified by an optional configuration option to meson.
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>   lib/meson.build   | 6 +++++-
>   meson_options.txt | 4 ++++
>   2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/meson.build b/lib/meson.build
> index 114eadde..672b4206 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -125,7 +125,11 @@ if chamelium.found()
>   	lib_sources += 'igt_chamelium_stream.c'
>   endif
>   
> -srcdir = join_paths(meson.source_root(), 'tests')
> +if get_option('srcdir') != ''
> +    srcdir = join_paths(get_option('srcdir'), 'tests')
> +else
> +    srcdir = join_paths(meson.source_root(), 'tests')
> +endif
>   
>   lib_version = vcs_tag(input : 'version.h.in', output : 'version.h',
>   		      fallback : 'NO-GIT',
> diff --git a/meson_options.txt b/meson_options.txt
> index ff3abf08..a0a1aaed 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -50,3 +50,7 @@ option('use_rpath',
>          type : 'boolean',
>          value : false,
>          description : 'Set runpath on installed executables for libigt.so')
> +
> +option('srcdir',
> +       type : 'string',
> +       description : 'Path to source code to be compiled into binaries (optional)')

Shouldn't this read: "Path to THE source code to be compiled 
(optional)"? Compiling into binaries is a little redundant, so I would 
drop it.

Other than this, the rationale seems sane, but I am not 
knowledgeable-enough about IGT's build system to comment more on it:

Acked-by: Martin Peres <martin.peres@mupuf.org>

> 
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2021-02-28 10:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-27 14:49 [igt-dev] [PATCH i-g-t] meson: Allow source location to be configurable Richard Purdie
2021-02-27 15:45 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-02-27 17:26 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-02-28 10:06 ` Martin Peres [this message]
2021-02-28 12:29   ` [igt-dev] [PATCH i-g-t] " Richard Purdie
2021-03-01  6:43     ` Martin Peres
2021-03-01  7:30       ` Petri Latvala

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=4b0ea6a7-92a7-566a-ce32-f8548eb87092@mupuf.org \
    --to=martin.peres@mupuf.org \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=richard.purdie@linuxfoundation.org \
    /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.