[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: carriage return line endings vs. literal ^M in status.m4
From: |
Ralf Wildenhues |
Subject: |
Re: carriage return line endings vs. literal ^M in status.m4 |
Date: |
Sat, 5 Apr 2008 14:51:48 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
D'oh, I didn't mean to post the patch as on top of yours.
Here it is against current master. Sorry about that.
Cheers,
Ralf
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index b4dec08..e4daa38 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -539,9 +539,15 @@ m4_ifdef([_AC_SUBST_FILES],
[\$ac_cs_awk_pipe_fini])
_ACAWK
_ACEOF
+dnl See if CR is the EOL marker. If not, remove any EOL-related
+dnl ^M bytes and escape any remaining ones. If so, just use mv.
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
-sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" < "$tmp/subs1.awk" >
"$tmp/subs.awk" \
- || AC_MSG_ERROR([could not setup config files machinery])
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" ||
+ AC_MSG_ERROR([could not setup config files machinery])
_ACEOF
# VPATH may cause trouble with some makes, so we remove $(srcdir),
- carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Eric Blake, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4,
Ralf Wildenhues <=
- Working os/2 configuratie, Elbert Pol, 2008/04/05
- Re: Working os/2 configuratie, Eric Blake, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Eric Blake, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Jim Meyering, 2008/04/05
- Re: carriage return line endings vs. literal ^M in status.m4, Ralf Wildenhues, 2008/04/05