This is the mail archive of the
mailing list for the Cygwin project.
^M problem in porting unix programs to window
- From: "kenny at ca" <heqing dot gugle at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 8 Jul 2010 02:09:09 -0700 (PDT)
- Subject: ^M problem in porting unix programs to window
I am porting a unix project to windows via cygwin. make tool and perl script
are used. The perl script file is called in a makefile to create some
directories and move some files. All directory names written in the
makefile are edited by emacs under linux, as well as the makefile. So I
believe there is no ctrl-M in the files.
But when I run make under cygwin, all directories are appended with ctrl-M,
like /c/1/2/3^M, where the path of /1/2 is made by make. The perl file is
called with /c/1/2/3 as a path argument by the makefile. I print out the
value of the path variable before and after calling the perl script, and
there is no ctrl-M. Also, I print out the value of path argument in the perl
file, but ctrl-M comes up.
I suspected that it might be caused by bash shell, so I repeated the
procedure using tcsh. The problem still existed.
In all, the development environment includes cygwin, make, perl, and bash or
tcsh shell. All are installed with cygwin setup.
If someone has experience with it, please advise me. Thanks a lot.
View this message in context: http://old.nabble.com/%5EM-problem-in-porting-unix-programs-to-window-tp29104357p29104357.html
Sent from the Cygwin list mailing list archive at Nabble.com.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple