automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.13.1d-2


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.13.1d-212-g3c331df
Date: Mon, 13 May 2013 20:11:20 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=3c331df4e854ce4a66c2bd81f8223e1ead363448

The branch, master has been updated
       via  3c331df4e854ce4a66c2bd81f8223e1ead363448 (commit)
       via  c148dc73a92c1df5e70a61e9495e62c010090bd4 (commit)
       via  32eb770b73903a6b09216709790a093b33afff8d (commit)
       via  f233bf8f277775f37b7dd4559af237d129231cbb (commit)
      from  4c39a5fa96ddc86d5c0d96153fb79696bf5edf0c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3c331df4e854ce4a66c2bd81f8223e1ead363448
Merge: 4c39a5f c148dc7
Author: Stefano Lattarini <address@hidden>
Date:   Mon May 13 21:38:46 2013 +0200

    Merge branch 'maint'
    
    * maint:
      Use AC_DEFUN_ONCE to define AM_PROG_CC_C_O
      compile: avoid AC_PROG_CC messy rewrite
      options: tiny simplification in dealing with incompatible versions

-----------------------------------------------------------------------

Summary of changes:
 lib/Automake/Options.pm |    3 +-
 m4/init.m4              |   52 +++++-----------------------------------------
 m4/minuso.m4            |   29 ++++++++++++++++----------
 t/add-missing.tap       |    9 +++----
 t/am-prog-cc-c-o.sh     |    4 +-
 t/subobj.sh             |    3 +-
 6 files changed, 33 insertions(+), 67 deletions(-)

diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index a6a42a7..1490ac3 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -379,8 +379,7 @@ sub _process_option_list (\%@)
           # Got a version number.
           if (Automake::Version::check ($VERSION, $&))
             {
-              error ($where, "require Automake $_, but have $VERSION",
-                     uniq_scope => US_GLOBAL);
+              error ($where, "require Automake $_, but have $VERSION");
               $ret = 0;
             }
         }
diff --git a/m4/init.m4 b/m4/init.m4
index 9c7ab2f..ec193f7 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -106,6 +106,12 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
                  [m4_define([AC_PROG_OBJCXX],
                             
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
 ])
+dnl Automatically invoke AM_PROG_CC_C_O as necessary.  Since AC_PROG_CC is
+dnl usually called after AM_INIT_AUTOMAKE, we arrange for the test to be
+dnl done later by AC_CONFIG_COMMANDS_PRE.
+AC_CONFIG_COMMANDS_PRE([AC_PROVIDE_IFELSE(
+    [AC_PROG_CC],
+    [AC_LANG_PUSH([C]) AM_PROG_CC_C_O AC_LANG_POP([C])])])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
@@ -162,52 +168,6 @@ 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])])
 
-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
 # that is generated.  The stamp files are numbered to have different names.
diff --git a/m4/minuso.m4 b/m4/minuso.m4
index 17fa8c9..06f74c9 100644
--- a/m4/minuso.m4
+++ b/m4/minuso.m4
@@ -7,19 +7,26 @@
 
 # AM_PROG_CC_C_O
 # --------------
-# Basically a no-op now, completely superseded by the AC_PROG_CC
-# adjusted by Automake.  Kept for backward-compatibility.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC])dnl
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+   # Losing compiler, so override with the 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
 dnl Make sure AC_PROG_CC is never called again, or it will override our
 dnl setting of CC.
 m4_define([AC_PROG_CC],
           [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-# For better backward-compatibility.  Users are advised to stop
-# relying on this cache variable and C preprocessor symbol ASAP.
-eval ac_cv_prog_cc_${am__cc}_c_o=\$am_cv_prog_cc_${am__cc}_c_o
-if eval test \"\$ac_cv_prog_cc_${am__cc}_c_o\" != yes; then
-  AC_DEFINE([NO_MINUS_C_MINUS_O], [1],
-            [Define to 1 if your C compiler doesn't accept -c and -o 
together.])
-fi
 ])
diff --git a/t/add-missing.tap b/t/add-missing.tap
index 9c4b774..053b9a1 100755
--- a/t/add-missing.tap
+++ b/t/add-missing.tap
@@ -62,6 +62,7 @@ AC_CANONICAL_TARGET
 AC_CANONICAL_SYSTEM
 AM_PATH_LISPDIR
 AM_PATH_PYTHON
+AC_OUTPUT
 END
 $ACLOCAL || framework_failure_ "cannot pre-compute aclocal.m4"
 
@@ -247,7 +248,6 @@ check_ <<'END'
 depcomp/C
 == Files ==
 depcomp
-compile
 == configure.ac ==
 AC_PROG_CC
 == Makefile.am ==
@@ -272,9 +272,10 @@ compile
 == Files ==
 compile
 == configure.ac ==
-# Using AC_PROG_CC in configure.ac should be enough.  No
-# need to also define, say, xxx_PROGRAMS in Makefile.am.
+# Using AC_PROG_CC and AC_OUTPUT in configure.ac should be enough.
+# No need to also define, say, xxx_PROGRAMS in Makefile.am.
 AC_PROG_CC
+AC_OUTPUT
 END
 
 # For config.guess and config.sub.
@@ -295,7 +296,6 @@ check_ <<'END'
 == Name ==
 ylwrap/Lex
 == Files ==
-compile
 ylwrap
 == configure.ac ==
 AC_PROG_CC
@@ -310,7 +310,6 @@ check_ <<'END'
 == Name ==
 ylwrap/Yacc
 == Files ==
-compile
 ylwrap
 == configure.ac ==
 AC_PROG_CC
diff --git a/t/am-prog-cc-c-o.sh b/t/am-prog-cc-c-o.sh
index da6a3a4..549cdcc 100755
--- a/t/am-prog-cc-c-o.sh
+++ b/t/am-prog-cc-c-o.sh
@@ -56,7 +56,7 @@ $AUTOMAKE --add-missing
 
 ./configure >stdout || { cat stdout; exit 1; }
 cat stdout
-grep 'understands -c and -o together.* yes$' stdout
+$EGREP 'understands? -c and -o together.* yes$' stdout
 # No repeated checks please.
 test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
 $MAKE
@@ -83,7 +83,7 @@ CC=$am_testaux_builddir/cc-no-c-o; export CC
 
 ./configure >stdout || { cat stdout; exit 1; }
 cat stdout
-grep 'understands -c and -o together.* no$' stdout
+$EGREP 'understands? -c and -o together.* no$' stdout
 # No repeated checks please.
 test $(grep -c ".*-c['\" ].*-o['\" ]" stdout) -eq 1
 $MAKE
diff --git a/t/subobj.sh b/t/subobj.sh
index 22ab2d3..f595e68 100755
--- a/t/subobj.sh
+++ b/t/subobj.sh
@@ -23,6 +23,7 @@ AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_YACC
 AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -75,7 +76,7 @@ rm -f compile
 $AUTOMAKE --add-missing 2>stderr || { cat stderr >&2; exit 1; }
 cat stderr >&2
 # Make sure compile is installed, and that Automake says so.
-grep '^configure\.ac:4:.*install.*compile' stderr
+grep '^configure\.ac:[48]:.*install.*compile' stderr
 test -f compile
 
 grep '^generic/a\.\$(OBJEXT):' Makefile.in


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]