From d52a2fc5280936fc16494d6a3aa3aee4949f7590 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 9 Jan 2024 23:16:36 -0500 Subject: [PATCH] meson: create dist archives suitable for building with configure, too Run autogen.sh as a dist script while creating the tarball. Also update autogen.sh to detect when it is being run from `meson dist`, and use that as the srcdir. Signed-off-by: Eli Schwartz --- autogen.sh | 7 +++++++ meson.build | 2 ++ 2 files changed, 9 insertions(+) diff --git a/autogen.sh b/autogen.sh index 3745acde1..d634461a2 100755 --- a/autogen.sh +++ b/autogen.sh @@ -23,6 +23,13 @@ PROJECT="libva" +# for `meson dist` +if test -z "$srcdir"; then + srcdir="$MESON_PROJECT_DIST_ROOT" + test -n "$srcdir" || srcdir="$MESON_DIST_ROOT" + NOCONFIGURE=1 +fi + test -n "$srcdir" || srcdir="`dirname \"$0\"`" test -n "$srcdir" || srcdir=. diff --git a/meson.build b/meson.build index 6acf90676..c7009f8fb 100644 --- a/meson.build +++ b/meson.build @@ -157,3 +157,5 @@ doxygen = find_program('doxygen', required: false) if get_option('enable_docs') and doxygen.found() subdir('doc') endif + +meson.add_dist_script('./autogen.sh')