* platforms/linux.make (platform-check): Make more robust.
[mono.git] / mcs / build / platforms / linux.make
index ed86a5f8a82382b5a19815aab75edab66640775c..7a03aa48a86db31791e64b6386a3d4b907e678b8 100644 (file)
@@ -9,7 +9,7 @@ PLATFORM_RUNTIME = $(RUNTIME)
 PLATFORM_CORLIB = mscorlib.dll
 
 BOOTSTRAP_MCS = mcs
-RESGEN = monoresgen
+RESGEN = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_RESGEN)
 
 PLATFORM_PATH_SEPARATOR = :
 
@@ -23,7 +23,8 @@ hidden_prefix = .
 hidden_suffix = 
 
 platform-check:
-       @set fnord $(BOOTSTRAP_MCS) ; if type $$2 >/dev/null 2>&1 ; then :; else \
+       @set fnord $(BOOTSTRAP_MCS) ; while test "$$#" > 2; do case $$2 in *=*) shift ;; *) break ;; esac done ; \
+       if type $$2 >/dev/null 2>&1 ; then :; else \
            echo "*** You need a C# compiler installed to build MCS. (make sure mcs works from the command line)" ; \
            echo "*** Read INSTALL.txt for information on how to bootstrap" ; \
            echo "*** a Mono installation." ; \