2007/9/7, Keith MARSHALL <[EMAIL PROTECTED]>: > However, your problem is quite specific, and I happen to have spent some > time analysing the particular circumstances which cause it. It is caused, > very specifically, by a command substitution of the form: > > $ some command "anything`command producing CRLF output`anything" ... > > I've grepped all the Makefiles in my build tree, and I can find only one > place where such a construct occurs: > > $ grep -n '$(version)$(revision)' `find . -iname Makefile\*` > ./doc/Makefile:79:<TAB>sed -e "s;@VERSION@;$(version)$(revision);" $< \ > [...other matches, with no quoted substitutions, snipped...] > > Note that, because of the definitions for version and revision, which you've > already specified, make will transform this into a form which triggers the > substitution bug in MSYS shell. Studying, your diagnostic, I see a stray > \01 byte inserted after your `$(version)' substitution, but not after the > `$(revision)' substitution. Since I know that the circumstances triggering > this bug are very specific, I can deduce: > > 1) The cat command being invoked by the `$(version)' substitution is *not* > the MSYS cat; it is a CRLF output format variant you've obtained from > some other source, and you need to get it out of the MSYS PATH. > > 2) The sed command used by the `$(revision)' substitution *is* the MSYS > sed, (or it is an alternative which produces LF only text output).
CRLF is the reason. I forgot to mention I was using CVS code that time. I did not know that CVS client would do LF -> CRLF then (downloaded from http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/cvs-1-11-22.zip). I checked my system, msys cat was the only cat. It cat'ed what was there, LF -> LF, and CRLF -> CRLF. BTW, is it possible to keep line ending using that CVS? Using groff-current, I finally finished making. Those problems, except stray byte, still exist. "make clean" is done before make again. -- Yu-ning Feng
