summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2018-05-27 20:59:59 -0700
committerRuss Allbery <eagle@eyrie.org>2018-05-27 20:59:59 -0700
commitbdcb3741db27d6b773ce7cdf05aab063a70ea100 (patch)
tree11e11bb646e0b58db6e23b59e3c856ea59ef3545 /Makefile.am
parent62a9101895a2d596bf91231f119d338d2025ff08 (diff)
Update to rra-c-util 7.2 and C TAP Harness 4.3
Update to rra-c-util 7.2: * Improve configure output for krb5-config testing. * Define UINT32_MAX for systems that don't have it. * Add SPDX-License-Identifier headers to all substantial source files. * Fix new warnings from GCC 7 and Clang warnings. * Require Test::Strict 0.25 or later to run those tests. * Fix off-by-one error in return-value checks for snprintf. * Use Autoconf to probe for supported warning flags. * Fix running module-version-t -u with current versions of Perl. * Use C_TAP_SOURCE and C_TAP_BUILD instead of SOURCE and BUILD. Update to C TAP Harness 4.3: * Add support for valgrind and libtool in test lists. * Report test failures as left and right, not wanted and expected. * Fix string comparisons with NULL pointers and the string "(null)". * Add SPDX-License-Identifier headers to all substantial source files. * Avoid zero-length realloc allocations in breallocarray. * Fix new warnings from GCC 7 and Clang warnings. * Use C_TAP_SOURCE and C_TAP_BUILD instead of SOURCE and BUILD.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am45
1 files changed, 12 insertions, 33 deletions
diff --git a/Makefile.am b/Makefile.am
index 4fb0b06..eb9ba7e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,8 @@
# Automake makefile for wallet.
#
# Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2006, 2007, 2008, 2010, 2013, 2014
+# Copyright 2016, 2018 Russ Allbery <eagle@eyrie.org>
+# Copyright 2006-2008, 2010, 2013-2014
# The Board of Trustees of the Leland Stanford Junior University
#
# See LICENSE for licensing terms.
@@ -134,9 +134,9 @@ EXTRA_DIST = .gitignore .travis.yml LICENSE autogen client/wallet.pod \
# Supporting convenience libraries used by other targets.
noinst_LIBRARIES = portable/libportable.a util/libutil.a
-portable_libportable_a_SOURCES = portable/dummy.c portable/krb5-extra.c \
- portable/krb5.h portable/macros.h portable/stdbool.h \
- portable/system.h portable/uio.h
+portable_libportable_a_SOURCES = portable/dummy.c portable/krb5.h \
+ portable/macros.h portable/stdbool.h portable/system.h \
+ portable/uio.h
portable_libportable_a_CPPFLAGS = $(KRB5_CPPFLAGS)
portable_libportable_a_LIBADD = $(LIBOBJS)
util_libutil_a_SOURCES = util/macros.h util/messages-krb5.c \
@@ -182,32 +182,12 @@ dist_pkgdata_DATA = perl/sql/Wallet-Schema-0.07-0.08-MySQL.sql \
perl/sql/Wallet-Schema-0.09-PostgreSQL.sql \
perl/sql/Wallet-Schema-0.09-SQLite.sql
-# A set of flags for warnings. Add -O because gcc won't find some warnings
-# without optimization turned on. Desirable warnings that can't be turned
-# on due to other problems:
-#
-# -Wconversion http://bugs.debian.org/488884 (htons warnings)
-#
-# Last checked against gcc 4.8.2 (2014-04-12). -D_FORTIFY_SOURCE=2 enables
-# warn_unused_result attribute markings on glibc functions on Linux, which
-# catches a few more issues.
-if WARNINGS_GCC
- WARNINGS = -g -O -fstrict-overflow -fstrict-aliasing -D_FORTIFY_SOURCE=2 \
- -Wall -Wextra -Wendif-labels -Wformat=2 -Winit-self -Wswitch-enum \
- -Wstrict-overflow=5 -Wmissing-format-attribute -Wfloat-equal \
- -Wdeclaration-after-statement -Wshadow -Wpointer-arith \
- -Wbad-function-cast -Wcast-align -Wwrite-strings -Wjump-misses-init \
- -Wlogical-op -Wstrict-prototypes -Wold-style-definition \
- -Wmissing-prototypes -Wnormalized=nfc -Wpacked -Wredundant-decls \
- -Wnested-externs -Winline -Wvla -Werror
-endif
-if WARNINGS_CLANG
- WARNINGS = -Weverything -Wno-padded
-endif
-
+# Separate target for a human to request building everything with as many
+# compiler warnings enabled as possible.
warnings:
- $(MAKE) V=0 CFLAGS='$(WARNINGS)' KRB5_CPPFLAGS='$(KRB5_CPPFLAGS_GCC)'
- $(MAKE) V=0 CFLAGS='$(WARNINGS)' \
+ $(MAKE) V=0 CFLAGS='$(WARNINGS_CFLAGS) $(AM_CFLAGS)' \
+ KRB5_CPPFLAGS='$(KRB5_CPPFLAGS_GCC)'
+ $(MAKE) V=0 CFLAGS='$(WARNINGS_CFLAGS) $(AM_CFLAGS)' \
KRB5_CPPFLAGS='$(KRB5_CPPFLAGS_GCC)' $(check_PROGRAMS)
# Remove some additional files.
@@ -272,7 +252,6 @@ install-data-local:
esac ; \
cd perl && ./Build install $$flags --destdir '$(DESTDIR)'
-# ExtUtils::MakeMaker really likes moving the Makefile aside.
clean-local:
set -e; if [ -f "perl/Build" ] ; then \
cd perl && ./Build realclean ; \
@@ -293,8 +272,8 @@ check_PROGRAMS = tests/runtests tests/portable/asprintf-t \
tests/portable/mkstemp-t tests/portable/setenv-t \
tests/portable/snprintf-t tests/util/messages-krb5-t \
tests/util/messages-t tests/util/xmalloc
-tests_runtests_CPPFLAGS = -DSOURCE='"$(abs_top_srcdir)/tests"' \
- -DBUILD='"$(abs_top_builddir)/tests"'
+tests_runtests_CPPFLAGS = -DC_TAP_SOURCE='"$(abs_top_srcdir)/tests"' \
+ -DC_TAP_BUILD='"$(abs_top_builddir)/tests"'
check_LIBRARIES = tests/tap/libtap.a
tests_tap_libtap_a_CPPFLAGS = -I$(abs_top_srcdir)/tests $(KRB5_CPPFLAGS)
tests_tap_libtap_a_SOURCES = tests/tap/basic.c tests/tap/basic.h \