To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 2518
2517  |  2519
Subject: 
Current Makefile logic fails for nonNT Windows OS
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Fri, 3 May 2002 12:38:18 GMT
Viewed: 
2269 times
  
I am compiling under windows 98 using cygwin version 1.3.10. In
Makefile.common (/legOS-0.2.6,/legOS-0.2.6/util) the logic to determine
whether the OS is a windows system fails due to the fact that uname returns
CYGWIN_98-4.10. I submitted a bug report for this
(https://sourceforge.net/tracker/index.php?func=detail&aid=551601&group_id=2587&atid=102587).
I have a quick hack which solves this problem.  The following is my modified
if statement which catches nonNT systems.

#
# WindowsNT/Cygnwin, test against several values:
#
ifneq (,$(findstring $(OSTYPE),cygwin32 cygwin CYGWIN_NT-4.0 CYGWIN_NT-5.0
CYGWIN_NT-5.1 WindowsNT Windows_NT)||$(findstring CYGWIN,$(OSTYPE)))
EXT=.exe
CC =gcc
CFLAGS+=-D_WIN32
endif

Note the extra ||$(findstring CYGWIN,$(OSTYPE)) which looks for CYGWIN
(capital letters!) in the return of uname.  As far as I can tell this should
work for ALL cygwin versions and windows os (Anyone with exceptions??? try
uname at cygwin prompt).

As stated in my bug report there has to be a better way to check for OSTYPE
so I am open to suggestions and guidance of where to look.  I have been
checking out the gnu docs for make and bash.

Ed



Message has 1 Reply:
  Re: Current Makefile logic fails for nonNT Windows OS
 
Taking a second look at this and noticing some past post about this issue with WinXP ((URL) a much cleaner code might look like the following # # WindowsNT/Cygnwin, test against several values: # ifneq (,$(findstring $(OSTYPE),cygwin32 cygwin (...) (23 years ago, 3-May-02, to lugnet.robotics.rcx.legos)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR