Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Envelope-From: markie AT osafoundation DOT org X-Envelope-To: Mime-Version: 1.0 (Apple Message framework v618) To: cygwin AT cygwin DOT com Message-Id: <24B60BF0-B58E-11D8-93D7-000A95BDA2FE@osafoundation.org> Content-Type: multipart/alternative; boundary=Apple-Mail-16-606928982 From: Mark Jaffe Subject: Recognizing host OS Date: Thu, 3 Jun 2004 11:45:11 -0700 X-Scanned-By: MIMEDefang 2.39 X-IsSubscribed: yes --Apple-Mail-16-606928982 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed I am very perplexed by this situation, and I wonder if I am alone. When compiling our sources (mixed environments supported) I am discovering that when run on cygwin (host WinXP env) the make script is failing to properly identify the OS. I have documented this here: (in the following, REAL_OS is determined in the subject Makefile thus: REAL_OS=unknown ifeq ($(OS),Cygwin) REAL_OS=WINNT endif ifeq ($(OS),WINNT) REAL_OS=WINNT endif OS and PLATFORM are determined in an included Makefile.inc thus: OS=$(shell uname) ifeq ($(findstring CYGWIN,$(OS)),CYGWIN) OS=Cygwin endif ifeq ($(findstring WINNT,$(OS)),WINNT) OS=Cygwin endif ifeq ($(OS),Cygwin) PYTHON:=$(PREFIX)/bin/$(PYTHON).exe SITE=bin/Lib/site-packages PLATFORM=windows else ifeq ($(OS),Darwin) FRAMEWORK=Library/Frameworks/Python.framework/Versions/2.3 PYTHON:=$(PREFIX)/$(FRAMEWORK)/bin/$(PYTHON) SITE=$(FRAMEWORK)/lib/python2.3/site-packages PLATFORM=macosx else PYTHON:=$(PREFIX)/bin/$(PYTHON) SITE=lib/python2.3/site-packages PLATFORM=linux endif endif ) dummy: @echo "OS is" $(OS) "real OS is " $(REAL_OS) " platform is " $(PLATFORM) @something=$(findstring WIN,$(OS)) @echo $(something) and running it four times in a row without any other changes yielded this result: builder AT haleakala ~/new-extern/external/openssl $ make dummy OS is Cygwin real OS is WINNT platform is windows builder AT haleakala ~/new-extern/external/openssl $ make dummy OS is CYGWIN_NT-5.1 real OS is unknown platform is linux builder AT haleakala ~/new-extern/external/openssl $ make dummy OS is Cygwin real OS is WINNT platform is windows builder AT haleakala ~/new-extern/external/openssl $ make dummy OS is real OS is unknown platform is linux -- Mark Jaffe | (415) 946-3028 (work) Release Engineer | (408) 807-2093 (cell) OSAF | (415) 946-3001 (FAX) markie AT osafoundation DOT org | http://www.osafoundation.org/ PGP Fingerprint: 3435 EB88 6424 F5DF F2CA EF16 2DBF DFEF 143C 1ADE --Apple-Mail-16-606928982 Content-Transfer-Encoding: 7bit Content-Type: text/enriched; charset=US-ASCII I am very perplexed by this situation, and I wonder if I am alone. When compiling our sources (mixed environments supported) I am discovering that when run on cygwin (host WinXP env) the make script is failing to properly identify the OS. I have documented this here: (in the following, REAL_OS is determined in the subject Makefile thus: REAL_OS=unknown ifeq ($(OS),Cygwin) REAL_OS=WINNT endif ifeq ($(OS),WINNT) REAL_OS=WINNT endif OS and PLATFORM are determined in an included Makefile.inc thus: OS=$(shell uname) ifeq ($(findstring CYGWIN,$(OS)),CYGWIN) OS=Cygwin endif ifeq ($(findstring WINNT,$(OS)),WINNT) OS=Cygwin endif ifeq ($(OS),Cygwin) PYTHON:=$(PREFIX)/bin/$(PYTHON).exe SITE=bin/Lib/site-packages PLATFORM=windows else ifeq ($(OS),Darwin) FRAMEWORK=Library/Frameworks/Python.framework/Versions/2.3 PYTHON:=$(PREFIX)/$(FRAMEWORK)/bin/$(PYTHON) SITE=$(FRAMEWORK)/lib/python2.3/site-packages PLATFORM=macosx else PYTHON:=$(PREFIX)/bin/$(PYTHON) SITE=lib/python2.3/site-packages PLATFORM=linux endif endif ) dummy: @echo "OS is" $(OS) "real OS is " $(REAL_OS) " platform is " $(PLATFORM) @something=$(findstring WIN,$(OS)) @echo $(something) and running it four times in a row without any other changes yielded this result: builder AT haleakala ~/new-extern/external/openssl $ make dummy OS is Cygwin real OS is WINNT platform is windows builder AT haleakala ~/new-extern/external/openssl $ make dummy OS is CYGWIN_NT-5.1 real OS is unknown platform is linux builder AT haleakala ~/new-extern/external/openssl $ make dummy OS is Cygwin real OS is WINNT platform is windows builder AT haleakala ~/new-extern/external/openssl $ make dummy OS is real OS is unknown platform is linux Andale Mono-- Mark Jaffe | (415) 946-3028 (work) Release Engineer | (408) 807-2093 (cell) OSAF | (415) 946-3001 (FAX) markie AT osafoundation DOT org | http://www.osafoundation.org/ PGP Fingerprint: 3435 EB88 6424 F5DF F2CA EF16 2DBF DFEF 143C 1ADE --Apple-Mail-16-606928982--