public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] CR's in build tree under Cygwin?
@ 2000-10-24 18:19 Grant Edwards
  2000-10-24 18:58 ` Jonathan Larmour
  2000-10-25  5:43 ` Bart Veer
  0 siblings, 2 replies; 4+ messages in thread
From: Grant Edwards @ 2000-10-24 18:19 UTC (permalink / raw)
  To: ecos-discuss

When I configured a new build tree using the command line ecosconfig.exe
program under Cygwin, all of the text files it created had CR/LF line endings.
This caused one of the "make" commands to fail.

A quick 2-line shell script with "tr" and then a "file . -type f -exec ..."
fixed things so that it built just fine. Nothing impresses the Windows guy
looking over you shoulder like nice, cryptic "find" command, but there must
be an easier way to do this that doesn't make Win32 users' eyes roll back in
their heads.

How do others avoid the CR problem when configuring a build tree under
Cygwin?

Does the Win32 GUI config tool generate files w/o CRs in them?

Do people usually have their build trees mounted in "text" mode under Cygwin?

[I had assumed that they should be mounted in binary mode since the arm-elf
tools built more easily that way...]

-- 
Grant Edwards
grante@visi.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] CR's in build tree under Cygwin?
  2000-10-24 18:19 [ECOS] CR's in build tree under Cygwin? Grant Edwards
@ 2000-10-24 18:58 ` Jonathan Larmour
  2000-10-25  5:43 ` Bart Veer
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Larmour @ 2000-10-24 18:58 UTC (permalink / raw)
  To: Grant Edwards; +Cc: ecos-discuss

Grant Edwards wrote:
> 
> Does the Win32 GUI config tool generate files w/o CRs in them?

Yes.
 
> Do people usually have their build trees mounted in "text" mode under Cygwin?
> 
> [I had assumed that they should be mounted in binary mode since the arm-elf
> tools built more easily that way...]

Yeah, unfortunately the tools output stuff with CRLFs so Windows newbies
can edit them in their favourite windows editor :-/. The result is that
eCos build trees should actually be mounted in text mode.

Jifl
-- 
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS  Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow."  ||  These opinions are all my own fault

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] CR's in build tree under Cygwin?
  2000-10-24 18:19 [ECOS] CR's in build tree under Cygwin? Grant Edwards
  2000-10-24 18:58 ` Jonathan Larmour
@ 2000-10-25  5:43 ` Bart Veer
  2000-10-25  7:18   ` Grant Edwards
  1 sibling, 1 reply; 4+ messages in thread
From: Bart Veer @ 2000-10-25  5:43 UTC (permalink / raw)
  To: grante; +Cc: ecos-discuss

>>>>> "Grant" == Grant Edwards <grante@visi.com> writes:

    Grant> When I configured a new build tree using the command line
    Grant> ecosconfig.exe program under Cygwin, all of the text files
    Grant> it created had CR/LF line endings. This caused one of the
    Grant> "make" commands to fail.

    Grant> A quick 2-line shell script with "tr" and then a "file .
    Grant> -type f -exec ..." fixed things so that it built just fine.
    Grant> Nothing impresses the Windows guy looking over you shoulder
    Grant> like nice, cryptic "find" command, but there must be an
    Grant> easier way to do this that doesn't make Win32 users' eyes
    Grant> roll back in their heads.

    Grant> How do others avoid the CR problem when configuring a build
    Grant> tree under Cygwin?

    Grant> Does the Win32 GUI config tool generate files w/o CRs in
    Grant> them?

    Grant> Do people usually have their build trees mounted in "text"
    Grant> mode under Cygwin?

    Grant> [I had assumed that they should be mounted in binary mode
    Grant> since the arm-elf tools built more easily that way...]

No. eCos build trees have to be on drives mounted in text mode. This
is documented behaviour. The problem is that there are some files in
the build tree, e.g. the ecos.ecc savefile, which users will want to
edit. We cannot mandate cygwin-aware editors, e.g. some people might
want to use notepad. Hence the files need to contain cr/lf pairs.

Work has been done on some of the tools, e.g. gcc and (I thought)
make, so that they just ignore spurious carriage returns. Such tricks
can avoid many of the problems people encounter. However there are
complications, for example I believe that a compiler that always just
ignores carriage returns is not standards-compliant.

It is a shame that there are still operating systems out there which
insist on using two characters to mark the end of a line. I believe
Unix systems have managed with just a single character since 1969 or
so.

Bart

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] CR's in build tree under Cygwin?
  2000-10-25  5:43 ` Bart Veer
@ 2000-10-25  7:18   ` Grant Edwards
  0 siblings, 0 replies; 4+ messages in thread
From: Grant Edwards @ 2000-10-25  7:18 UTC (permalink / raw)
  To: Bart Veer; +Cc: ecos-discuss

On Wed, Oct 25, 2000 at 01:43:51PM +0100, Bart Veer wrote:

>     Grant> Do people usually have their build trees mounted in "text"
>     Grant> mode under Cygwin?
> 
>     Grant> [I had assumed that they should be mounted in binary mode
>     Grant> since the arm-elf tools built more easily that way...]
> 
> No. eCos build trees have to be on drives mounted in text mode. This
> is documented behaviour. The problem is that there are some files in
> the build tree, e.g. the ecos.ecc savefile, which users will want to
> edit. We cannot mandate cygwin-aware editors, e.g. some people might
> want to use notepad. Hence the files need to contain cr/lf pairs.

Thanks.  That's what I expected, but I wanted to make sure.  I must have
missed the mention of text mode in the docs.

> Work has been done on some of the tools, e.g. gcc and (I thought)
> make, so that they just ignore spurious carriage returns. 

It might not actually be make's fault. The last time I tracked down one of
these problems it turned out that a file included by a makefile was
generated by a shell-script, and the CR somehow confused the shell script
that generated that file.

> It is a shame that there are still operating systems out there which
> insist on using two characters to mark the end of a line. I believe
> Unix systems have managed with just a single character since 1969 or
> so.

I'm sure it all goes back to either something in DEC RSX-11 or something in
Gary Killdall's childhood.  ;)

-- 
Grant Edwards
grante@visi.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-10-25  7:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-24 18:19 [ECOS] CR's in build tree under Cygwin? Grant Edwards
2000-10-24 18:58 ` Jonathan Larmour
2000-10-25  5:43 ` Bart Veer
2000-10-25  7:18   ` Grant Edwards

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).