From e1357de27563b875f385e32981d698f7eac687cd Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Tue, 3 Oct 2017 21:26:50 +0100 Subject: [PATCH] Make sure *.am.inc are up to date before `make dist` v2017.12 didn't include test-libglnx-shutil.c, but if you re-run autogen.sh (as we do in Debian, to update the Autotools build system) it will try to build it. Signed-off-by: Simon McVittie Closes: #1274 Approved by: cgwalters --- Makefile.am | 11 +++++++++++ autogen.sh | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index b542d3c1..48d0830f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -90,13 +90,24 @@ endif # end ENABLE_RUST libglnx_srcpath := $(srcdir)/libglnx libglnx_cflags := $(OT_DEP_GIO_UNIX_CFLAGS) "-I$(libglnx_srcpath)" libglnx_libs := $(OT_DEP_GIO_UNIX_LIBS) +# See also autogen.sh and https://github.com/ostreedev/ostree/pull/1274/ +# +# v2017.12 didn't include test-libglnx-shutil.c, but if you re-run +# autogen.sh (as we do in Debian, to update the Autotools build system) +# it will try to build it. +$(srcdir)/libglnx/Makefile-libglnx.am.inc: $(srcdir)/libglnx/Makefile-libglnx.am + sed -e 's,$(libglnx_srcpath),libglnx,g' < $< > $@ include libglnx/Makefile-libglnx.am.inc EXTRA_DIST += libglnx/Makefile-libglnx.am noinst_LTLIBRARIES += libglnx.la libbsdiff_srcpath := $(srcdir)/bsdiff + libbsdiff_cflags := $(OT_DEP_GIO_UNIX_CFLAGS) "-I$(bsdiff_srcpath)" libbsdiff_libs := $(OT_DEP_GIO_UNIX_LIBS) +# See the comment for the similar libglnx bit above +$(srcdir)/bsdiff/Makefile-bsdiff.am.inc: $(srcdir)/bsdiff/Makefile-bsdiff.am.inc + sed -e 's,$(libbsdiff_srcpath),bsdiff,g' < $< > $@ include bsdiff/Makefile-bsdiff.am.inc EXTRA_DIST += bsdiff/Makefile-bsdiff.am noinst_LTLIBRARIES += libbsdiff.la diff --git a/autogen.sh b/autogen.sh index 17f6abf4..689bba8f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -31,7 +31,8 @@ fi if ! test -f libglnx/README.md || ! test -f bsdiff/README.md; then git submodule update --init fi -# Workaround automake bug with subdir-objects and computed paths +# Workaround automake bug with subdir-objects and computed paths; if +# changing this, please also change Makefile.am. sed -e 's,$(libglnx_srcpath),libglnx,g' < libglnx/Makefile-libglnx.am >libglnx/Makefile-libglnx.am.inc sed -e 's,$(libbsdiff_srcpath),bsdiff,g' < bsdiff/Makefile-bsdiff.am >bsdiff/Makefile-bsdiff.am.inc