[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trailing whitespace stripped by autoconf
From: |
Akim Demaille |
Subject: |
Re: Trailing whitespace stripped by autoconf |
Date: |
Thu, 22 May 2003 16:32:16 +0200 |
User-agent: |
Gnus/5.1001 (Gnus v5.10.1) Emacs/21.3 (gnu/linux) |
| Not sure if this has been reported yet.
| While testing a patch to gcc's configure.in, I found that a configure
| script generated by cvs autoconf (2.57a) always resulted in a failed
| test. The configure script uses
|
| cat > conftest.big <<EOF
| 0000 00000010 00000000 017a0001 781a0004 .........z..x...
| 0010 00000001 00000012 00000018 00000000 ................
| 0020 00000008 04000000 0844 .........D
| EOF
|
| to create a few files, then runs objdump on a compiled object
| and compares the last three lines to these files. As such, the six
| spaces after the last 'D' are significant, as they are also generated
| by objdump.
| Now it seems that cvs autoconf trims trailing whitespace, resulting
| in incorrected test files; even surrounding the spaces with a single
| set of [] didn't help.
| This is a regression, as autoconf 2.13 DTRT here.
hi Tim,
I think this behavior was reverted. But my own opinion here is that
you should not depend on trailing spaces, as some tools strip them.
You should use
| sed 's/|$//' > conftest.big <<EOF
| 0000 00000010 00000000 017a0001 781a0004 .........z..x...|
| 0010 00000001 00000012 00000018 00000000 ................|
| 0020 00000008 04000000 0844 .........D |
| EOF
instead. Not just to workaround Autoconf, but to avoid accidental
changes.