Hash :
97cbf15b
Author :
Date :
2011-11-05T10:43:27
Merge branch 'msvc' into master Commits merged from msvc: - warnings: fix buglets for portability warnings - tests: extend tests on 'extra-portability' warning category Extra testsuite edits: * tests/extra-portability3.test: Use `$original_AUTOMAKE' instead of hackishly extracting the first component of `$AUTOMAKE'. * tests/extra-portability.test: Likewise. Also, since we are at it, throw in a couple of small extensions and tweakings (suggested by the minor merge conflicts).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
#! /bin/sh
# Copyright (C) 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check interactions between the `portability-recursive' and
# `extra-portability' warning categories.
. ./defs || Exit 1
set -e
# We want (almost) complete control over automake options.
AUTOMAKE="$original_AUTOMAKE --foreign -Werror"
cat >>configure.in <<END
AC_PROG_CC
AC_PROG_RANLIB
AC_OUTPUT
END
$ACLOCAL
cat >Makefile.am <<'END'
baz = $(foo$(bar))
lib_LIBRARIES = libfoo.a
libfoo_a_SOURCES = foo.c
END
# 'extra-portability' implies 'portability-recursive'.
AUTOMAKE_fails -Wextra-portability
grep 'requires.*AM_PROG_AR' stderr
grep 'recursive variable expansion' stderr
# We can disable 'extra-portability' while leaving
# 'portability-recursive' intact.
AUTOMAKE_fails -Wportability-recursive -Wno-extra-portability
grep 'requires.*AM_PROG_AR' stderr && Exit 1
grep 'recursive variable expansion' stderr
# We can disable 'portability-recursive' while leaving
# 'extra-portability' intact.
AUTOMAKE_fails -Wextra-portability -Wno-portability-recursive
grep 'requires.*AM_PROG_AR' stderr
grep 'recursive variable expansion' stderr && Exit 1
# Disabling 'portability' disables 'portability-recursive' and
# 'extra-portability'.
$AUTOMAKE -Wextra-portability -Wno-portability
: