From 5dbbfd4f6830d29879b2dfdf83edcd5a8f30c855 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Fri, 30 Aug 2019 14:09:56 -0700 Subject: Run the cmake build as part of make distcheck. Verify that the CMake build works from a release tarball. This will give coverage for problems with part of the CMake build description not being included in the source package. We still consider the `make dist` output from the GNU autotools build to be canonical. --- Makefile.am | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Makefile.am b/Makefile.am index 1336d80..70eb174 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,17 @@ dist-hook: echo "OK"; \ fi; \ done + +# Verify cmake works with the dist tarball. +cmake_builddir = _build.cmake +distcheck-hook: + $(RM) -rf $(cmake_builddir) + mkdir $(cmake_builddir) + cd $(cmake_builddir) && cmake ../$(top_distdir) + cd $(cmake_builddir) && cmake --build . + cd $(cmake_builddir) && ctest + $(RM) -rf $(cmake_builddir) + debug: $(MAKE) all CFLAGS="@DEBUG@" -- cgit v1.2.1