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 <smcv@debian.org>
tingping/wmclass
Simon McVittie 2016-06-12 10:04:01 +01:00
parent ee77be10b5
commit ccaa7428ae
1 changed files with 2 additions and 2 deletions

View File

@ -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