From: Stefano Lattarini Date: Sat, 12 Jan 2013 13:16:04 +0000 (+0100) Subject: Merge branch 'master' into ng/master X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adbc02f851471df72079559cf0c833fc55066d40;p=thirdparty%2Fautomake.git Merge branch 'master' into ng/master 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 --- adbc02f851471df72079559cf0c833fc55066d40 diff --cc .gitignore index e026b3aaa,4b509d70e..efd432826 --- a/.gitignore +++ b/.gitignore @@@ -42,8 -42,9 +43,9 @@@ /t/wrap/aclocal-1.* /t/wrap/automake-1.* /t/ax/test-defs.sh +/testsuite-autodeps.am /t/ax/shell-no-trail-bslash + /t/ax/cc-no-c-o -/t/testsuite-part.am /t/*-w.tap /t/*-w.sh /t/depcomp-*.tap diff --cc Makefile.am index 0bfe50745,21d21c0a6..7ead7d921 --- a/Makefile.am +++ b/Makefile.am @@@ -453,10 -443,23 +453,21 @@@ EXTRA_DIST += t/ax/shell-no-trail-bslas 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 @@@ -523,6 -526,21 +534,17 @@@ check-no-trailing-backslash-in-recipes CONFIG_SHELL='$(abs_top_builddir)/t/ax/shell-no-trail-bslash' .PHONY: check-no-trailing-backslash-in-recipes + # 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 + -## Checking the list of tests. -test_subdirs = t t/pm contrib/t -include $(srcdir)/t/CheckListOfTests.am - # Run the testsuite with the installed aclocal and automake. installcheck-local: installcheck-testsuite installcheck-testsuite: diff --cc automake.in index 2649d3a56,a1d1f2ea5..102182204 --- a/automake.in +++ b/automake.in @@@ -4206,8 -5155,8 +4203,7 @@@ sub scan_autoconf_traces ($ 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, @@@ -4609,48 -5564,18 +4601,15 @@@ sub check_gnits_standard # 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. diff --cc m4/init.m4 index aa32ca681,6857c4410..38b77cc7b --- a/m4/init.m4 +++ b/m4/init.m4 @@@ -104,8 -109,66 +104,53 @@@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX] [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 diff --cc t/depcomp8a.sh index 59619dc74,76aa37694..aa46c4dcf --- a/t/depcomp8a.sh +++ b/t/depcomp8a.sh @@@ -52,7 -51,24 +51,8 @@@ $ACLOCA $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 diff --cc t/depcomp8b.sh index b47549637,52382f14a..bd7dab8db --- a/t/depcomp8b.sh +++ b/t/depcomp8b.sh @@@ -24,7 -24,7 +24,6 @@@ required='cc libtoolize 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 @@@ -40,11 -40,28 +39,12 @@@ echo 'int foo (void) { return 0; }' > f 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 diff --cc t/lex-line.sh index 5eaf33fe5,9b27c0b39..7eca2d8f3 --- a/t/lex-line.sh +++ b/t/lex-line.sh @@@ -23,8 -23,8 +23,7 @@@ required='cc lex . 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 diff --cc t/silent-c.sh index dcf544b0e,28f1667b6..77c72c44f --- a/t/silent-c.sh +++ b/t/silent-c.sh @@@ -23,8 -23,8 +23,7 @@@ required=c mkdir sub cat >>configure.ac <<'EOF' -AC_CONFIG_FILES([sub/Makefile]) AC_PROG_CC - AM_PROG_CC_C_O AC_OUTPUT EOF diff --cc t/silent-lex.sh index 0dee197d7,320e91f1d..20d4c7caa --- a/t/silent-lex.sh +++ b/t/silent-lex.sh @@@ -19,9 -19,11 +19,8 @@@ 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 diff --cc t/silent-lt.sh index d14377a99,0ae003719..3d3023edc --- a/t/silent-lt.sh +++ b/t/silent-lt.sh @@@ -23,9 -23,9 +23,8 @@@ required='cc libtoolize 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 diff --cc t/silent-many-languages.sh index 34183dfe6,5395af6d9..f3c11d79e --- a/t/silent-many-languages.sh +++ b/t/silent-many-languages.sh @@@ -83,8 -90,9 +83,7 @@@ do_and_check_verbose_build ( unset rebuild } -mkdir sub - cat >>configure.ac <<'EOF' - AM_PROG_CC_C_O AC_PROG_F77 AC_PROG_FC AC_PROG_LEX diff --cc t/silent-yacc.sh index 0f4bccf0f,bb215189f..eba36b54f --- a/t/silent-yacc.sh +++ b/t/silent-yacc.sh @@@ -19,9 -19,12 +19,9 @@@ 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 diff --cc t/yacc-dist-nobuild-subdir.sh index 478e3f11e,8b7f7ff9b..235b4dc21 --- a/t/yacc-dist-nobuild-subdir.sh +++ b/t/yacc-dist-nobuild-subdir.sh @@@ -20,9 -21,12 +20,8 @@@ 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 diff --cc t/yacc-line.sh index 53e7481d0,9067a2d63..f57bb394c --- a/t/yacc-line.sh +++ b/t/yacc-line.sh @@@ -22,8 -23,8 +22,7 @@@ required='cc yacc . 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