[Intel-gfx] [PATCH i-g-t 1/3] meson: Simple makefile integration

Arkadiusz Hiler arkadiusz.hiler at intel.com
Mon Sep 11 12:03:40 UTC 2017


On Fri, Sep 08, 2017 at 05:14:46PM +0200, Daniel Vetter wrote:
> Run ./meson.sh once, then you have
> 
> $ make
> 
> and
> 
> $ make test
> 
> available in the normal src root.
> 
> v2:
> 
> Add
> 
> $ make reconfigure
> 
> which is the meson equivalent to rerunning ./configure. Also takes
> some arguments if needed. Start out with --help, as usual.
> 
> v3: Use ninja -C (Chris).
> 
> v4: Catch more automake targets and point out what's happening
> (Petri).
> 
> Cc: Petri Latvala <petri.latvala at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  meson.sh | 35 +++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100755 meson.sh
> 
> diff --git a/meson.sh b/meson.sh
> new file mode 100755
> index 000000000000..94f3799a1b7e
> --- /dev/null
> +++ b/meson.sh
> @@ -0,0 +1,35 @@
> +#!/bin/bash
> +
> +cat > Makefile <<Makefile

This heredoc limit string is strangely confusing.

It took me way too long to parse that and get that << is not "appending"
(in this direction), and you do not want to append the original contents
of Makefile to the new one. Good ol' EOF should do.


Nonetheless,
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>

-- Arek

> +
> +.PHONY: default docs
> +default: all
> +
> +build/build.ninja:
> +	mkdir build
> +	meson
> +
> +all: build/build.ninja
> +	ninja -C build
> +
> +clean: build/build.ninja
> +	ninja -C build clean
> +
> +test: build/build.ninja
> +	ninja -C build test
> +
> +reconfigure: build/build.ninja
> +	ninja -C build reconfigure
> +
> +check distcheck dist distclean:
> +	echo "This is the meson wrapper, not automake" && false
> +
> +install uninstall:
> +	echo "meson install support not yet completed" && false
> +
> +docs:
> +	echo "meson gtkdoc support not yet completed" && false
> +
> +Makefile
> +
> +make $@
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list