Subject: Re: bin/36128: CRLF handling for make
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: David Holland <dholland@eecs.harvard.edu>
List: netbsd-bugs
Date: 04/14/2007 18:30:02
The following reply was made to PR bin/36128; it has been noted by GNATS.
From: dholland@eecs.harvard.edu (David Holland)
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,
dholland@eecs.harvard.edu
Subject: Re: bin/36128: CRLF handling for make
Date: Sat, 14 Apr 2007 14:27:51 -0400 (EDT)
David Laight <david@l8s.co.uk> wrote:
>> I am not at all convinced that this is a good idea. I think that people
>> who write their Makefiles under DOS should convert them to unix file
>> format before trying to use them under NetBSD.
>
> I tend to agree, some makefiles might even contain a <cr> character in
> a variable assignment!
> (I've certainly used them in shell scripts.)
>
> Also it is rather the thin end of a big wedge!
> For instance the sun C compiler (or rather the preprocessor) doesn't
> treat \<cr><lf> as a line continuation.
> So do we start converting broken source files as well ?
For the record, this is about using our make with third-party packages
that ship with makefiles apparently created under DOS. Nobody's
advocating commiting DOS text files into NetBSD.
And, you know, gmake already handles such makefiles. (gcc handles such
source files, too, and has for years. I don't see how the Sun compiler
is pertinent.)
Meanwhile, if you use a literal control character of any kind, *maybe*
excepting tabs, in a shell script or makefile you deserve the
consequences. :-) If you really need one, make one with tr or awk.
--
- David A. Holland / dholland@eecs.harvard.edu