Please never mind. ctrl-M is caught. In fact, it lies in makefile. when the path is transferred to perl, ctrl-M is treated as a part of path name.
ke...@ca wrote: > > Hi, there > > 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-tp29104357p29105204.html Sent from the Cygwin list mailing list archive at Nabble.com. -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple