Skip to content

Commit

Permalink
meson: create dist archives suitable for building with configure, too
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
eli-schwartz authored and XinfengZhang committed Feb 5, 2024
1 parent 4e3eb1f commit a438699
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
test -n "$srcdir" && NOCONFIGURE=1
fi

test -n "$srcdir" || srcdir="`dirname \"$0\"`"
test -n "$srcdir" || srcdir=.

Expand Down
2 changes: 2 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit a438699

Please sign in to comment.