[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 015/143] build-sys: add meson submodule
From: |
Alex Bennée |
Subject: |
Re: [PATCH 015/143] build-sys: add meson submodule |
Date: |
Fri, 07 Aug 2020 11:37:08 +0100 |
User-agent: |
mu4e 1.5.5; emacs 28.0.50 |
Paolo Bonzini <pbonzini@redhat.com> writes:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> .gitmodules | 3 +++
> configure | 44 +++++++++++++++++++++++++++++++++++++++++---
> meson | 1 +
> scripts/archive-source.sh | 3 ++-
> 4 files changed, 47 insertions(+), 4 deletions(-)
> create mode 160000 meson
>
> diff --git a/.gitmodules b/.gitmodules
> index 9c0501a..ce97939 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -58,3 +58,6 @@
> [submodule "roms/qboot"]
> path = roms/qboot
> url = https://github.com/bonzini/qboot
> +[submodule "meson"]
> + path = meson
> + url = https://github.com/mesonbuild/meson/
> diff --git a/configure b/configure
> index 13db149..d87d544 100755
> --- a/configure
> +++ b/configure
> @@ -174,6 +174,25 @@ path_of() {
> return 1
> }
>
> +version_ge () {
> + local_ver1=`echo $1 | tr . ' '`
> + local_ver2=`echo $2 | tr . ' '`
> + while true; do
> + set x $local_ver1
> + local_first=${2-0}
> + # shift 2 does nothing if there are less than 2 arguments
> + shift; shift
> + local_ver1=$*
> + set x $local_ver2
> + # the second argument finished, the first must be greater or equal
> + test $# = 1 && return 0
> + test $local_first -lt $2 && return 1
> + test $local_first -gt $2 && return 0
> + shift; shift
> + local_ver2=$*
> + done
> +}
> +
> have_backend () {
> echo "$trace_backends" | grep "$1" >/dev/null
> }
> @@ -1965,9 +1984,28 @@ then
> error_exit "Python not found. Use --python=/path/to/python"
> fi
>
> -if ! has "$meson"
> -then
> - error_exit "Meson not found. Use --meson=/path/to/meson"
> +if test -z "$meson" ; then
> + if has meson && version_ge "$(meson --version)" 0.55.0; then
> + meson=meson
> + elif test -e "${source_path}/.git" && test $git_update = 'yes' ; then
> + meson=git
> + elif test -e "${source_path}/meson/meson.py" ; then
> + meson=internal
> + fi
> +fi
> +
> +case "$meson" in
> + git | internal)
Is "internal" meant to be synonymous with "git"? AFAICT we don't
actually do anything with --meson=internal which is why it failed later.
> + if test "$meson" = git; then
> + git_submodules="${git_submodules} meson"
> + (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh"
> update meson)
> + fi
> + meson="${source_path}/meson/meson.py"
> + ;;
> +esac
> +
> +if ! has "$meson" ; then
> + error_exit "Meson not found. Use --meson=/path/to/meson|git|internal"
> fi
<snip>
--
Alex Bennée
- Re: [PATCH 005/143] meson: rename .inc.c files to .inc, (continued)
[PATCH 011/143] configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson, Paolo Bonzini, 2020/08/06
[PATCH 013/143] configure: generate Meson cross file, Paolo Bonzini, 2020/08/06
[PATCH 014/143] build-sys hack: link with whole .fa archives, Paolo Bonzini, 2020/08/06
[PATCH 015/143] build-sys: add meson submodule, Paolo Bonzini, 2020/08/06
- Re: [PATCH 015/143] build-sys: add meson submodule,
Alex Bennée <=
[PATCH 016/143] meson: move summary to meson.build, Paolo Bonzini, 2020/08/06
[PATCH 012/143] configure: integrate Meson in the build system, Paolo Bonzini, 2020/08/06
[PATCH 017/143] meson: enable pie, Paolo Bonzini, 2020/08/06
[PATCH 018/143] meson: use coverage option, Paolo Bonzini, 2020/08/06
[PATCH 020/143] meson: add testsuite Makefile generator, Paolo Bonzini, 2020/08/06
[PATCH 019/143] meson: add sparse support, Paolo Bonzini, 2020/08/06