libtool-patches
[Top][All Lists]
Advanced

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

make commit conflicts in configure files less likely


From: Ralf Wildenhues
Subject: make commit conflicts in configure files less likely
Date: Sat, 22 Aug 2009 21:32:48 +0200
User-agent: Mutt/1.5.20 (2009-08-09)

Nodaways, most projects don't commit generated configure scripts to
version control any more, but some notable ones still do, e.g., GCC and
the GNU toolchain.  The Libtool macros provide a bit of a stumbling
block for this as they are the most prominent remaining cause for
conflicts in merging different changes in those scripts, due to the use
of expanded line numbers in the form of the __oline__ autom4te feature.

Now, since most modern shells (except for dash, hello, Debian :-)
implement $LINENO support fairly well, I think there is little reason
to rely on this arcane way of expanding line numbers at configure script
generation time any more.  I thus propose this patch to remove them.

OK?

Thanks,
Ralf

2009-08-20  Ralf Wildenhues  <address@hidden>

        Remove __oline__ from macros, for less spurious configure diffs.
        * libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK, _LT_COMPILER_OPTION)
        (_LT_COMPILER_C_O, LT_PATH_NM): Replace __oline__ instances with
        $LINENO.
        * NEWS: Update.

diff --git a/NEWS b/NEWS
index be4dc4d..8666196 100644
--- a/NEWS
+++ b/NEWS
@@ -48,6 +48,8 @@ New in 2.2.8 2009-??-??: git version 2.2.7a, Libtool team:
   - Link mode works around a parallel build failure on Darwin 9.6.0 due
     to the `ar' `flock'ing an archive upon extraction, by protecting the
     extraction of convenience archives with a lock.
+  - The Libtool macro files do not contain instances of __oline__ any more,
+    easing merges for configure scripts that are added to version control.
 
 * Miscellaneous changes:
 
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index eebe990..7d4bc31 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1162,7 +1162,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
   if AC_TRY_EVAL(ac_compile); then
     if test "$lt_cv_prog_gnu_ld" = yes; then
       case `/usr/bin/file conftest.$ac_objext` in
@@ -1351,11 +1351,11 @@ AC_CACHE_CHECK([$1], [$2],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -1821,11 +1821,11 @@ AC_CACHE_CHECK([if $compiler supports -c -o 
file.$ac_objext],
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -3204,13 +3204,13 @@ _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name 
lister])dnl
 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
   [lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" 
>&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" 
>&AS_MESSAGE_LOG_FD)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&AS_MESSAGE_LOG_FD
-  (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
   cat conftest.out >&AS_MESSAGE_LOG_FD
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"




reply via email to

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