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:
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|