automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: build question


From: Eric Blake
Subject: Re: build question
Date: Sun, 10 Feb 2002 14:50:48 -0700

News on Automake 1.5d on cygwin. I downloaded tag Release-1-5d (as
opposed to the cvs head), and from my cygwin textmount, it wouldn't even
configure without coaxing:

$ make
cd . && perllibdir=./lib /home/eblake/automake/aclocal --acdir=m4 -I
/home/eblake/automake/m4
cd . && \
  perllibdir=./lib /home/eblake/automake/automake --libdir=lib --gnu 
Makefile
Makefile.am:34: bad macro name `--regex'
make: *** [Makefile.in] Error 1

Sure enough, line 33 had a trailing \, and the newly configured automake
had misinterpreted the line continuation.

However, on Tom Tromey's suggestion, I removed the call to binmode in
XFile.pm, and everything worked fine for me.  I was able to run automake
on files that previously died because of the CRLF nonsense of Windows.


2002-02-10  Eric Blake  <address@hidden>

        * lib/Automake/XFile.pm (open): Don't use binmode on files, as it
        breaks automake under cygwin.

Index: lib/Automake/XFile.pm
===================================================================
RCS file: /cvsroot/automake/automake/lib/Automake/XFile.pm,v
retrieving revision 1.1
diff -u -r1.1 XFile.pm
--- lib/Automake/XFile.pm       2 Oct 2001 17:17:45 -0000       1.1
+++ lib/Automake/XFile.pm       10 Feb 2002 22:02:06 -0000
@@ -135,7 +135,7 @@
       my $me = basename ($0);
       croak "$me: cannot open $file: $!\n";
     }
-  binmode $fh if $file =~ /^\s*>/;
+#  binmode $fh if $file =~ /^\s*>/;
 }

 ################################################


Alexandre Duret-Lutz wrote:
> 
> >>> "Tom" == Tom Tromey <address@hidden> writes:
> 
>  Tom> A problem with line termination in automake was reported on the
>  Tom> Classpath list.  I don't understand why this happens, since in
>  Tom> Automake::XFile we only call binmode when writing, not when reading.
> 
> How does Automake 1.5d behave?  The line termination handling
> has changed since 1.5.  Basically, Automake now uses chomp() and
> never do horrible things like `substr($_, -1, 1) eq "\n"'.
> 
> The perlport man page is very confusing about newline handling:
> in the same section it tells you that \r\n -> \n conversion is
> performed transparantly on i/o, and that you should use chomp()
> instead of chop() to trim newlines because they might take
> several characters...
> 
> [...]
> --
> Alexandre Duret-Lutz

-- 
This signature intentionally left boring.

Eric Blake             address@hidden
  BYU student, free software programmer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]