build: Add distcheck configure flags to fix systemd and bash-completion
authorPhilip Withnall <withnall@endlessm.com>
Tue, 22 Aug 2017 17:32:43 +0000 (18:32 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 22 Aug 2017 17:37:48 +0000 (17:37 +0000)
When running distcheck, the systemd system-generator and bash-completion
scripts are installed in absolute paths (/usr and /lib) as looked up
from their pkg-config files. This breaks distcheck. Use a
${prefix}-relative path for both of them when configuring for distcheck.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1103
Approved by: cgwalters

Makefile-bash.am
Makefile-switchroot.am

index e61829a231a3b35683fb21e047d4046e383ce6f1..2cb0315139130a8563d1158c2d522497e8674f1f 100644 (file)
@@ -19,3 +19,6 @@
 
 completionsdir = @BASH_COMPLETIONSDIR@
 dist_completions_DATA = bash/ostree
+
+# Allow the distcheck install under $prefix test to pass
+AM_DISTCHECK_CONFIGURE_FLAGS += BASH_COMPLETIONSDIR='$${datadir}/bash-completion/completions'
index dd24010e18714ee003afaa11bc862711bf17c792..70aa1c878686c58d473434e4d87a57647a6bc3ab 100644 (file)
@@ -68,4 +68,7 @@ ostree_system_generator_SOURCES = src/switchroot/ostree-mount-util.h \
 ostree_system_generator_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/libglnx -I$(srcdir)/src/libostree
 ostree_system_generator_CFLAGS = $(AM_CFLAGS) $(OT_INTERNAL_GIO_UNIX_CFLAGS)
 ostree_system_generator_LDADD = $(AM_LDFLAGS) libglnx.la libostree-1.la $(OT_INTERNAL_GIO_UNIX_LIBS)
+
+# Allow the distcheck install under $prefix test to pass
+AM_DISTCHECK_CONFIGURE_FLAGS += --with-systemdsystemgeneratordir='$${libdir}/systemd/system-generators'
 endif