]> sourceware.org Git - newlib-cygwin.git/commitdiff
* Makefile.in: Reorganize to try to allow lack of mingw/w32api to work.
authorChristopher Faylor <me@cgf.cx>
Sat, 19 Apr 2003 01:02:51 +0000 (01:02 +0000)
committerChristopher Faylor <me@cgf.cx>
Sat, 19 Apr 2003 01:02:51 +0000 (01:02 +0000)
winsup/ChangeLog
winsup/Makefile.common

index d755a26638fd5071ef12f50a80b63ce6b9b36579..6cd29febad4f100cf7de8a87fd6302a7d400c919 100644 (file)
@@ -1,3 +1,7 @@
+2003-04-18  Christopher Faylor  <cgf@redhat.com>
+
+       * Makefile.in: Reorganize to try to allow lack of mingw/w32api to work.
+
 2003-04-11  Christopher Faylor  <cgf@redhat.com>
 
        * Makefile.common (w32api_lib): Fix w32api detection.
index dcac394bbcf029e2381ca916d7b0cd9625cd7205..97812f9af2d94bada317660c03dab4a448dbdd95 100644 (file)
@@ -58,9 +58,6 @@ bz2lib_source:=$(updir)/bz2lib
 bz2lib_build:=$(bupdir)/bz2lib
 w32api_source:=$(updir)/w32api
 w32api_build:=$(bupdir)/w32api
-ifeq (,${findstring $(w32api_source),$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
-w32api_include:=-I$(w32api_source)/include
-endif
 w32api_lib:=$(w32api_build)/lib
 newlib_source:=$(updir1)/newlib
 newlib_build:=$(bupdir1)/newlib
@@ -83,12 +80,34 @@ ifeq (,${findstring $(cygwin_source)/include,$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)}
 cygwin_include:=-I$(cygwin_source)/include
 endif
 
+# Try to determine what directories are available in winsup.
+# Attempt to properly detect missing mingw or w32api and adjust command
+# line parameters appropriately
+
+nostdinc:=${shell [ -d "$(updir)/w32api" ] && echo "-nostdinc -nostdinc++"}
+ifneq (,$(nostdinc))
+ifeq (,${findstring $(w32api_source),$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
+w32api_include:=-I$(w32api_source)/include
+endif
+endif
+
+mingw_include:=${shell [ -d "$(mingw_source)/include" ] && echo "-I$(mingw_source)/include"}
+ifneq (,$(mingw_include))
+nostdlib:=-nostdlib
+else
+nostdlib:=
+endif
+
+ifeq (,${nostdlib})
+nostdinc:=
+endif
+
 INCLUDES:=-I. $(cygwin_include) -I$(cygwin_source) $(newlib_sys_include) $(newlib_include)  $(newlib_sys_include_include) $(w32api_include)
 ifdef CONFIG_DIR
 INCLUDES+=-I$(CONFIG_DIR)
 endif
 
-MINGW_INCLUDES:=-I$(updir)/mingw/include $(w32api_include)
+MINGW_INCLUDES:=${mingw_include} $(w32api_include)
 MINGW_CFLAGS:=-mno-cygwin $(MINGW_INCLUDES)
 MINGW_CXXFLAGS:=${filter-out $(newlib_source)/%,$(CXXFLAGS)} -mno-cygwin $(MINGW_INCLUDES)
 MINGW_LDFLAGS:=-B${mingw_build} -B${mingw_build}/mingwex
@@ -118,11 +137,6 @@ ifeq (,${findstring $(gcc_libdir),$(CFLAGS) $(CXXFLAGS) $(CXX) $(CC)})
 GCC_INCLUDE:=${subst //,/,-I$(gcc_libdir)/include}
 endif
 
-nostdinc:=${shell [ -d "$(updir)/w32api" ] && echo "-nostdinc -nostdinc++"}
-ifeq (,$(nostdinc))
-override w32api_lib:=${subst //,/,${shell $(CC) -print-search-dirs | awk -F: '/^librar/{for (i = 1; i <= NF; i++) if ($$i ~ /\/lib\/*$$/) foo=$$i} END{print foo}'}/w32api}
-endif
-
 COMPILE_CXX=$(CXX) $c $(nostdinc) $(ALL_CXXFLAGS) $(GCC_INCLUDE) \
             -fno-rtti -fno-exceptions
 COMPILE_CC=$(CC) $c $(nostdinc) $(ALL_CFLAGS) $(GCC_INCLUDE)
This page took 0.035833 seconds and 5 git commands to generate.