[pacman-dev,2/2] meson: generate the autotools distribution files

Message ID 20190815235546.21922-3-eschwartz@archlinux.org
State New
Headers show
  • Building a unified dist tarball for
Related show

Commit Message

Eli Schwartz Aug. 15, 2019, 11:55 p.m. UTC
For cross-compatibility with autotools, a dist tarball created from
either meson or autotools should have everything needed to build with
either build system. This ensures that all the files which "make dist"
would make available, are available.

In order for this to work, autogen.sh needs to know how to enter the
dist working directory, and fail if it cannot successfully cd or run
autoreconf. (It's fine if patch fails because the patch was already

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
 autogen.sh  | 6 +++++-
 meson.build | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)


diff --git a/autogen.sh b/autogen.sh
index 18fa641d..3b0acec6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,10 @@ 
 #!/bin/sh -x
-autoreconf -i
+if [ -n "$MESON_DIST_ROOT" ]; then
+	cd "$MESON_DIST_ROOT" || exit 1
+autoreconf -i || exit 1
 patch -d build-aux -Np0 -i ltmain-asneeded.patch
 exit 0
diff --git a/meson.build b/meson.build
index 7be2425c..389a95b7 100644
--- a/meson.build
+++ b/meson.build
@@ -414,6 +414,8 @@  TEST_ENV.set('PMTEST_LIBMAKEPKG_DIR', join_paths(meson.build_root(), 'scripts/li
 TEST_ENV.set('PMTEST_UTIL_DIR', meson.build_root() + '/')
 TEST_ENV.set('PMTEST_SCRIPT_DIR', join_paths(meson.build_root(), 'scripts/'))