This merge breaks few tests. They will be adjusted by follow-up patches.
* master: (26 commits)
tests: remove most uses of the AM_PROG_CC_C_O obsolete macro
coverage: obsolete macro AM_PROG_CC_C_O should cause no warning nor errors
INSTALL: update copyright years
ithreads: use runtime (not configure time) detection of perl threads
copyright: add few missing copyright notices
maint: files in PLANS are to be exempted from copyright notice
maint: consistently honor the UPDATE_COPYRIGHT_YEAR environment variable
copyright: update some copyright years
compile: use 'compile' script when "-c -o" is used with losing compilers
HACKING: suggest more checks before releasing
tests: can fake a compiler not grasping "-c -o" -- globally in all tests
sync: update files from upstream with "make fetch"
typofix: in comments in GNUmakefile
Rename 'maint/' -> 'maintainer/', for Git's sake
HACKING: minor typofix
HACKING: bug-tracker, the PLANS directory, and how to plan "big" changes
HACKING: rewindable branches should live in the 'experimental/*' namespace
HACKING: fixlets about git branch rewinding policy
HACKING: commit messages are not to follow GCS ChangeLog rules too strongly
HACKING: "detailed explanation" in commit messages is almost mandatory
...
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
/t/wrap/aclocal-1.*
/t/wrap/automake-1.*
/t/ax/test-defs.sh
+/testsuite-autodeps.am
/t/ax/shell-no-trail-bslash
-/t/testsuite-part.am
+ /t/ax/cc-no-c-o
/t/*-w.tap
/t/*-w.sh
/t/depcomp-*.tap
CLEANFILES += t/ax/shell-no-trail-bslash
noinst_SCRIPTS += t/ax/shell-no-trail-bslash
+ t/ax/cc-no-c-o: t/ax/cc-no-c-o.in Makefile
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN)in=t/ax/cc-no-c-o.in \
+ && $(MKDIR_P) t/ax \
+ && $(do_subst) <$(srcdir)/$$in >$@-t \
+ && chmod a+x $@-t
+ $(generated_file_finalize)
+ EXTRA_DIST += t/ax/cc-no-c-o.in
+ CLEANFILES += t/ax/cc-no-c-o
+ noinst_SCRIPTS += t/ax/cc-no-c-o
+
runtest: t/ax/runtest.in Makefile
$(AM_V_at)rm -f $@ $@-t
- $(AM_V_GEN)in=t/ax/runtest.in \
- && $(MKDIR_P) t/ax \
- && $(do_subst) <$(srcdir)/$$in >$@-t \
- && chmod a+x $@-t
+ $(AM_V_GEN)$(do_subst)
+ $(AM_V_at)chmod a+x $@-t
$(generated_file_finalize)
EXTRA_DIST += t/ax/runtest.in
CLEANFILES += runtest
CONFIG_SHELL='$(abs_top_builddir)/t/ax/shell-no-trail-bslash'
.PHONY: check-no-trailing-backslash-in-recipes
-## Checking the list of tests.
-test_subdirs = t t/pm contrib/t
-include $(srcdir)/t/CheckListOfTests.am
-
+ # Some compilers out there (hello, MSVC) still choke on "-c -o" being
+ # passed together on the command line. Run the whole testsuite faking
+ # the presence of such a compiler, to help catch regressions that would
+ # otherwise only present themselves later "in the wild". See also the
+ # long discussion about automake bug#13378.
+ check-cc-no-c-o:
+ $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) check \
+ CC='$(abs_top_builddir)/t/ax/cc-no-c-o' \
+ GNU_CC='$(abs_top_builddir)/t/ax/cc-no-c-o'
+ .PHONY: check-cc-no-c-o
+
# Run the testsuite with the installed aclocal and automake.
installcheck-local: installcheck-testsuite
installcheck-testsuite:
AM_GNU_GETTEXT => 0,
AM_GNU_GETTEXT_INTL_SUBDIR => 0,
AM_INIT_AUTOMAKE => 0,
- AM_MAINTAINER_MODE => 0,
AM_PROG_AR => 0,
- AM_PROG_CC_C_O => 0,
_AM_SUBST_NOTMAKE => 1,
_AM_COND_IF => 1,
_AM_COND_ELSE => 1,
# Note that the calls to these functions are computed, so don't bother
# searching for their precise names in the source.
- # Rewrite a single C source file.
- sub lang_c_rewrite
-# This is just a convenience function that can be used to determine
-# when a subdir object should be used.
-sub lang_sub_obj
--{
- my ($directory, $base, $ext, $obj, $have_per_exec_flags, $var) = @_;
-
- # libtool is always able to put the object at the proper place, so we
- # do not have to require AM_PROG_CC_C_O when building '.lo' files.
- if (! $seen_cc_c_o && $obj ne '.lo')
- {
- if ($directory && $directory ne '.')
- {
- msg_var ('portability', $var,
- "compiling '$directory/$base.c' in subdir requires"
- . " 'AM_PROG_CC_C_O' in '$configure_ac'",
- uniq_scope => US_GLOBAL,
- uniq_part => 'AM_PROG_CC_C_O subdir');
- }
- elsif ($have_per_exec_flags)
- {
- msg_var ('portability', $var,
- "compiling '$base.c' with per-target flags requires"
- . " 'AM_PROG_CC_C_O' in '$configure_ac'",
- uniq_scope => US_GLOBAL,
- uniq_part => 'AM_PROG_CC_C_O per-target');
- }
- }
- # Not a useless use of return: the caller of this subroutine will
- # behave differently if a value is actually returned, and since perl
- # returns the value of the last expressions seen by default, we
- # need to explicitly return and undefined value.
- return undef;
- return option 'subdir-objects' ? LANG_SUBDIR : LANG_PROCESS;
--}
-
+# Header files are simply ignored.
+sub lang_header_ignore { 1; }
-# Rewrite a single header file.
-sub lang_header_rewrite
+# Vala '.vapi' are a kind of header files as well, and should
+# not be processed into compilation rules.
- sub lang_vala_ignore
++sub lang_vala_ignore
{
- # Header files are simply ignored.
- return LANG_IGNORE;
+ my ($directory, $base, $ext) = @_;
+ return ($ext =~ m/\.vapi$/ ? 1 : 0);
}
# Rewrite a single Vala source file.
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
-AC_REQUIRE([AM_SILENT_RULES])dnl
-dnl The testsuite driver may need to know about EXEEXT, so add the
-dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
-dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
- [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
-
-dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+AC_REQUIRE([AM_SILENT_RULES])])
+ dnl We have to redefine AC_PROG_CC to allow our compile rules to use
+ dnl "-c -o" together also with losing compilers.
+ dnl FIXME: Add references to the original discussion and bug report.
+ dnl FIXME: Shameless copy & paste from Autoconf internals, since trying to
+ dnl play smart among tangles of AC_REQUIRE, m4_defn, m4_provide and
+ dnl other tricks was proving too difficult, and in the end, likely
+ dnl more brittle too. And this should anyway be just a temporary
+ dnl band-aid, until Autoconf provides the semantics and/or hooks we
+ dnl need (hint hint, nudge nudge) ...
+ AC_DEFUN([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])
+ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+ AC_REQUIRE_AUX_FILE([compile])dnl
+ dnl FIXME The following abomination is expected to disappear in
+ dnl Automake 1.14.
+ AC_MSG_CHECKING([whether $CC understands -c and -o together])
+ set dummy $CC; am__cc=`AS_ECHO(["$[2]"]) | \
+ sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'`
+ AC_CACHE_VAL([am_cv_prog_cc_${am__cc}_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # We do the test twice because some compilers refuse to overwrite an
+ # existing .o file with -o, though they will create one.
+ ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&AS_MESSAGE_LOG_FD'
+ rm -f conftest2.*
+ if _AC_DO_VAR(ac_try) && test -f conftest2.$ac_objext
+ then
+ eval am_cv_prog_cc_${am__cc}_c_o=yes
+ else
+ eval am_cv_prog_cc_${am__cc}_c_o=no
+ fi
+ rm -f core conftest*
+ ])dnl
+ if eval test \"\$am_cv_prog_cc_${am__cc}_c_o\" = yes; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ # Losing compiler, so wrap it with the 'compile' script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+ fi
+ ])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
$AUTOMAKE -a
grep include Makefile.in # For debugging.
grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
- grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
-grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
-grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1
+
-$AUTOCONF
-# Don't reject slower dependency extractors, for better coverage.
-./configure --enable-dependency-tracking
-$MAKE
-cross_compiling || ./zardoz
-DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
-
-# Try again with subdir-objects option.
-
-echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
-
-$AUTOMAKE
-grep include Makefile.in # For debugging.
-grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
-grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
++LC_ALL=C grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1
$AUTOCONF
cat >> configure.ac << 'END'
AC_PROG_CC
- AM_PROG_CC_C_O
-#x AM_PROG_CC_C_O
AM_PROG_AR
AC_PROG_LIBTOOL
AC_OUTPUT
echo 'int bar (void) { return 0; }' > sub/bar.c
libtoolize
-
$ACLOCAL
$AUTOMAKE -a
-grep include Makefile.in # For debugging.
-grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
-grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
-grep 'include.*/\./\$(DEPDIR)' Makefile.in && exit 1
-
-$AUTOCONF
-# Don't reject slower dependency extractors, for better coverage.
-./configure --enable-dependency-tracking
-$MAKE
-DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' $MAKE distcheck
-
-# Try again with subdir-objects option.
-
-echo AUTOMAKE_OPTIONS = subdir-objects >> Makefile.am
+
-$AUTOMAKE
grep include Makefile.in # For debugging.
grep 'include.*\./\$(DEPDIR)/foo\.P' Makefile.in
--grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
++LC_ALL=C grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' Makefile.in
$EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && exit 1
$AUTOCONF
. test-init.sh
cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
- AM_PROG_CC_C_O
AC_PROG_LEX
AC_OUTPUT
END
mkdir sub
cat >>configure.ac <<'EOF'
-AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
- AM_PROG_CC_C_O
AC_OUTPUT
EOF
required='cc lex'
. test-init.sh
-mkdir sub
-
cat >>configure.ac <<'EOF'
- AM_PROG_CC_C_O
AC_PROG_LEX
-AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
EOF
mkdir sub
cat >>configure.ac <<'EOF'
-AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_AR
- AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_OUTPUT
EOF
unset rebuild
}
-mkdir sub
-
cat >>configure.ac <<'EOF'
- AM_PROG_CC_C_O
AC_PROG_F77
AC_PROG_FC
AC_PROG_LEX
required='cc yacc'
. test-init.sh
-mkdir sub
-
cat >>configure.ac <<'EOF'
- AM_PROG_CC_C_O
+ AC_PROG_CC
AC_PROG_YACC
-AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
EOF
required='cc yacc'
. test-init.sh
-# This test is bounded to fail for any implementation that
-# triggers automake bug#7884.
-useless_vpath_rebuild && skip_ "would trip on automake bug#7884"
-
cat >> configure.ac << 'END'
AC_PROG_CC
- AM_PROG_CC_C_O
AC_PROG_YACC
AC_OUTPUT
END
. test-init.sh
cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
- AM_PROG_CC_C_O
AC_PROG_YACC
AC_OUTPUT
END