From f9e096dbb498a409814d95258220a342160cdf46 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 13 Dec 2019 15:25:28 -0500 Subject: [PATCH] Fix: make dist fails on sdt-probe test with autotools v1.16+ MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The 'dist' target fails when building with autotools 1.16.1 as the behaviour of BUILT_SOURCES has changed in 1.16 [1]. BUILT_SOURCES are now built as part of the 'dist' target which causes it to fail on machines that don't have dtrace installed. The following error is produced: DTRACE foobar_provider.h /bin/sh: -s: command not found The BUILT_SOURCES is skipped for build configurations where the build of the test helper 'userspace-probe-sdt-binary' is disabled. The resulting artifact, foobar_provider.h, is not part of the distributed tarball (marked as nodist), so this doesn't have any adverse effect. [1] https://www.mail-archive.com/automake@gnu.org/msg20156.html Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau Change-Id: Ibba4689775a8b002e8a959079b1f3c8db9917c5f --- .../utils/testapp/userspace-probe-sdt-binary/Makefile.am | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am b/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am index 591f4aa6c..73bf3a235 100644 --- a/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am +++ b/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am @@ -1,5 +1,14 @@ EXTRA_DIST = foobar_provider.d + +# Although this is redundant with the check performed in the parent +# Makefile.am, this is needed for autotools v1.16+ as BUILT_SOURCES is +# evaluated for the 'dist' target. +# +# It is fine to generate this header in the 'dist' target (when +# enabled) as it won't be distributed anyhow (it is marked as nodist). +if TEST_SDT_UPROBE BUILT_SOURCES = foobar_provider.h +endif noinst_PROGRAMS = userspace-probe-sdt-binary userspace_probe_sdt_binary_SOURCES = userspace-probe-sdt-binary.c sema.h sema.c -- 2.34.1