This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Migrating from MKS to Cygwin

Hi All,

My organization is evaluating Cygwin as a replacement for MKS. We will
be using Cygwin primarily for running our regression cases on windows
(Regression cases are common for Unix and  Windows Platforms). Goal is
to migrate to Cygwin with minimal changes to be done at regression
test cases scripts (Makefile etc.).

So far, the main challenges are  with "pwd" command and  the
invocation of applications with .bat extension.

PWD Command:

There are few regression cases which uses 'pwd' command in the
Makefile.Since, in the cygwin environment, POSIX paths are returned
and these are not compatible with the software applications under test
i.e. the software application is not able to resolve these paths.

As a workaround, I did the following :

- Define a bash function in .bashrc file, which internally calls
cygpath to return windows style paths. This will return the windows
style paths on bash shell but this function is not available in

- So, for Makefile, I have declared macro (makefile variable) and
using the cygpath to return windows style paths. But, this would
require changes in the Makefile i.e. to replace 'pwd' with ${PWD}.

- In order to minimize any changes in the Makefile, I also tried
downloading the GNU coreutils for Windows port and replacing pwd.exe
(/usr/bin) with the pwd.exe from coreutils. In this case, if I do pwd,
then I still get POSIX paths, but if I call pwd.exe with absolute
path, then it returns windows style paths. I am not sure, why it is
not working when pwd is called without any path.

Invocation of applications with .bat extension:

Second main difference that is observed is that in Cygwin, you have to
call the application with extension if it is .bat. This works
seamlessly on MKS.

Since, the software installation can't be changed to address this
problem, so far the workarounds are :

- Create an alias, but again this won't work in Makefile

- Create a softlink dynamically while running regressions (pre regression setup)

- Create a file with the application name and call the .bat file. Keep
these new executable files in a accessible path.


- Can someone please conform if the workarounds being used are OK. Is
there any better way of addressing these problems. Any patches for
both the problems?

- Why is the pwd not working, when pwd is used from coreutils.

Thanks in Advance,

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]