help-make
[Top][All Lists]
Advanced

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

Weird (and convenient) difference between cygwin and DOS


From: Mason
Subject: Weird (and convenient) difference between cygwin and DOS
Date: Wed, 23 May 2012 10:42:30 +0200
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120429 Firefox/12.0 SeaMonkey/2.9.1

Hello,

I'm (grudgingly) running Windows, and I need some Makefile to
work whether it is invoked from a bash shell under cygwin,
or from Microsoft's CMD shell in the "DOS" command-line.

(I'm using GNU Make 3.82, Built for i686-pc-mingw32)

I've found a strange way to distinguish between cygwin
and DOS, and I wanted to ask if it works by accident
or by design, and if there is a "better" way (for any
interpretation of "better").

Right now, I do:

ifdef windir
  XX = DOS
else
  XX = CYGWIN
endif

and it seems to work, apparently because DOS keeps the environment
variable in lower case, while CYGWIN sets it to upper case.

What do you think?

-- 
Regards.



reply via email to

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