From b2c59041a30ff2f71d4913a784324babd0a4d427 Mon Sep 17 00:00:00 2001 From: Michał Łyszczek Date: Sat, 27 Jan 2018 14:19:15 +0100 Subject: fix: enable analyzer only with --enable-analyzer enabling it always caused error on some old version of make --- configure.ac | 8 ++++++++ rb/Makefile.am | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 39baa46..2ee81fd 100644 --- a/configure.ac +++ b/configure.ac @@ -30,5 +30,13 @@ AS_IF([test "x$enable_threads" = "xyes"], enable_threads="no" ]) +### +# --enable-analyzer +# + +AC_ARG_ENABLE([analyzer], + AS_HELP_STRING([--enable-analyzer], [Enable static code analyzer]), + [enable_analyzer="yes"], [enable_analyzer="no"]) +AM_CONDITIONAL([ENABLE_ANALYZER], [test "x$enable_analyzer" = "xyes"]) AC_OUTPUT diff --git a/rb/Makefile.am b/rb/Makefile.am index 6ca20fb..1149249 100644 --- a/rb/Makefile.am +++ b/rb/Makefile.am @@ -13,6 +13,8 @@ LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \ # static code analyzer +if ENABLE_ANALYZER + analyze_plists = rb.plist MOSTLYCLEANFILES = $(analyze_plists) @@ -21,3 +23,5 @@ $(analyze_plists): %.plist: %.c @clang --analyze -I.. $< -o $@ analyze: $(analyze_plists) + +endif -- cgit v1.2.3-8-gadcc