* tests/depcomp.test: Do not create useless dummy source files.
Add a trailing `:' command.
* tests/depcomp2.test: Use `unset' on the CFLAG variable to ensure
it's not in in the environment, rather tthan exporting it with an
empty value. Do not pass CC=gcc to configure, as that's already
done in ./defs since we have gcc in $required. Ensure verbose
printing of captured stderr, and normalize its checking. Add a
trailing `:' command.
* tests/depcomp3.test: Quote literal dots and dollar characters in
grep regexps. Always use `: >' rather than `touch' to create empty
files. Explicitly declare phony targets as such in the created
Makefile.am. Add a trailing `:' command.
* tests/depcomp4.test: Quote literal dots and dollar characters in
grep regexp. Explicitly declare phony targets as such in the
created Makefile.am. Ensure verbose printing of captured makes'
stoud/stderr. Add a trailing `:' command.
* tests/depcomp5.test: Move setting of `errexit' shell flag earlier
in the script (just after inclusion of ./defs). Quote literal dots
and dollar characters in grep regexps. Explicitly declare phony
targets as such in the created Makefile.am. Add a trailing `:'
command.
* tests/depcomp6.test: Consistenty use m4 quoting in the generated
configure.in. Cosmetic fixes to spacing. Make the "dummy" `if'
statement required by OpenBSD's sh `set -e' more robust, and add
explanatory comments to it.
* tests/depcomp7.test: Likewise, and add a trailing `:' command.
2010-08-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Minor improvements and fixes in tests `depcomp*.test'.
+ * tests/depcomp.test: Do not create useless dummy source files.
+ Add a trailing `:' command.
+ * tests/depcomp2.test: Use `unset' on the CFLAG variable to ensure
+ it's not in in the environment, rather tthan exporting it with an
+ empty value. Do not pass CC=gcc to configure, as that's already
+ done in ./defs since we have gcc in $required. Ensure verbose
+ printing of captured stderr, and normalize its checking. Add a
+ trailing `:' command.
+ * tests/depcomp3.test: Quote literal dots and dollar characters in
+ grep regexps. Always use `: >' rather than `touch' to create empty
+ files. Explicitly declare phony targets as such in the created
+ Makefile.am. Add a trailing `:' command.
+ * tests/depcomp4.test: Quote literal dots and dollar characters in
+ grep regexp. Explicitly declare phony targets as such in the
+ created Makefile.am. Ensure verbose printing of captured makes'
+ stoud/stderr. Add a trailing `:' command.
+ * tests/depcomp5.test: Move setting of `errexit' shell flag earlier
+ in the script (just after inclusion of ./defs). Quote literal dots
+ and dollar characters in grep regexps. Explicitly declare phony
+ targets as such in the created Makefile.am. Add a trailing `:'
+ command.
+ * tests/depcomp6.test: Consistenty use m4 quoting in the generated
+ configure.in. Cosmetic fixes to spacing. Make the "dummy" `if'
+ statement required by OpenBSD's sh `set -e' more robust, and add
+ explanatory comments to it.
+ * tests/depcomp7.test: Likewise, and add a trailing `:' command.
+
Separate failing part of test `all.test'.
* tests/all.test: Keep only (x)failing part of the test. Working
checks moved out to ...
cp subdir/Makefile.am subdir2/Makefile.am
-: > subdir/foo.c
-: > subdir2/foo.c
-
$ACLOCAL
$AUTOMAKE --add-missing
# There used to be a bug where this was created in the first subdir with C
# sources in it instead of in $top_srcdir or $ac_auxdir
test -f depcomp
+
+:
: > subdir/foo.c
# Ignore user CFLAGS.
-CFLAGS=
-export CFLAGS
+unset CFLAGS || :
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure CC='gcc' 2>error.log
-test -z "`cat error.log`"
+./configure 2>stderr || { cat stderr >&2; Exit 1; }
+test ! -s stderr
+
+:
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
check_PROGRAMS = prg
prg_SOURCES = src/sub.c src/foo.h
+.PHONY: grepdeps
grepdeps:
- grep 'src/sub.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
+ grep 'src/sub\.\$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
END
mkdir src
-touch src/foo.h
+: > src/foo.h
cat >src/sub.c <<EOF
#include "foo.h"
./configure am_cv_CC_dependencies_compiler_type=dashmstdout
$MAKE check
$MAKE grepdeps
+
+:
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
noinst_LTLIBRARIES = liba.la
liba_la_SOURCES = a.c foo.h
+.PHONY: grepdeps
grepdeps:
- grep 'a.lo *:' ./$(DEPDIR)/a.Plo
+ grep 'a\.lo *:' ./$(DEPDIR)/a.Plo
END
: > foo.h
grep am_cv_CC_dependencies_compiler_type configure
./configure am_cv_CC_dependencies_compiler_type=makedepend
-$MAKE >output 2>&1
+$MAKE >output 2>&1 || { cat output; Exit 1; }
cat output
grep 'unknown directive' output && Exit 1
$MAKE grepdeps
+
+:
#! /bin/sh
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010 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
required='icc'
. ./defs || Exit 1
+set -e
+
# Automake supports icc since version 7.0 through a dedicated depcomp mode.
# icc 8.0 and greater understand gcc options, so depmode is set to gcc.
if icc -V -help 2>&1 | grep 'Version 7'; then
expect='depmode=gcc'
fi
-set -e
-
cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
check_PROGRAMS = prg
prg_SOURCES = src/sub.c src/foo.h
+.PHONY: grepdeps
grepdeps:
- grep 'src/sub.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
+ grep 'src/sub\.\$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
END
grep "$expect" Makefile
$MAKE check
$MAKE grepdeps
+
+:
#! /bin/sh
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2010 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
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_RANLIB
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
AC_OUTPUT
END
$AUTOMAKE -a
./configure --enable-dependency-tracking
-$MAKE
+$MAKE
# check that dependency tracking works
if grep 'depmode=none' Makefile; then :
cd sub2
$sleep
echo 'choke me' > sub3/ba3.h
- if $MAKE; then Exit 1; fi
+ # Do not use `$MAKE && Exit 1' here, since even relatively-recent
+ # versions of the BSD shell wrongly exit when the `errexit' shell
+ # flag is active if a command within "&&" fails inside a compound
+ # statement.
+ if $MAKE; then Exit 1; else :; fi
fi
+
:
#! /bin/sh
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2010 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
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_LIBTOOL
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
AC_OUTPUT
END
$AUTOMAKE -a
for staticshared in --disable-shared "" --disable-static; do
+
./configure --enable-dependency-tracking $staticshared
- $MAKE
+ $MAKE
# check that dependency tracking works
if grep 'depmode=none' Makefile; then :
cd sub2
$sleep
echo 'choke me' > sub3/ba3.h
- if $MAKE; then Exit 1; fi
+ # Do not use `$MAKE && Exit 1' here, since even relatively-recent
+ # versions of the BSD shell wrongly exit when the `errexit' shell
+ # flag is active if a command within "&&" fails inside a compound
+ # statement.
+ if $MAKE; then Exit 1; else :; fi
cd ..
fi
test ! -f sub2/sub3/ba3.d
echo 'extern int x;' > sub2/sub3/ba3.h
+
done
+
+: