From ccaa7428ae5f63d2ceee860853253d5d135e600c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 12 Jun 2016 10:04:01 +0100 Subject: [PATCH] autogen.sh: rely on VPATH when generating Makefile-*.am.inc This avoids hard-coding the (potentially absolute) srcdir used at autogen time into the build system. It's fine for an Automake build system to use relative paths in dependencies and rely on them being interpreted as relative to ${srcdir} even though the current working directory is ${buildddir}, because of make's "VPATH" feature, and we do it all the time in the handwritten parts of the build system. In particular, this (finally) makes distcheck work. Signed-off-by: Simon McVittie --- autogen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index b38e34c6..6a100675 100755 --- a/autogen.sh +++ b/autogen.sh @@ -22,8 +22,8 @@ if ! test -f libglnx/README.md -a -f bubblewrap/README.md; then git submodule update --init fi # Workaround automake bug with subdir-objects and computed paths -sed -e 's,$(libglnx_srcpath),'${srcdir}/libglnx,g < libglnx/Makefile-libglnx.am >libglnx/Makefile-libglnx.am.inc -sed -e 's,$(bwrap_srcpath),'${srcdir}/bubblewrap,g < bubblewrap/Makefile-bwrap.am >bubblewrap/Makefile-bwrap.am.inc +sed -e 's,$(libglnx_srcpath),libglnx,g' < libglnx/Makefile-libglnx.am >libglnx/Makefile-libglnx.am.inc +sed -e 's,$(bwrap_srcpath),bubblewrap,g' < bubblewrap/Makefile-bwrap.am >bubblewrap/Makefile-bwrap.am.inc GTKDOCIZE=$(which gtkdocize 2>/dev/null) if test -z $GTKDOCIZE; then