[System.IO.KeventWatcher] Disable the watcher when the root directory is deleted...
[mono.git] / mcs / class / aot-compiler / Makefile
index af1e707150cc9319043a97faf1ccf55703fa1c32..3f22e653c194bb21bb73162180d68468beb1be8e 100644 (file)
@@ -18,7 +18,9 @@ mcs_aot_image = $(the_libdir)/mcs.exe$(PLATFORM_AOT_SUFFIX)
 mscorlib_dll = $(the_libdir)/mscorlib.dll
 mscorlib_aot_image = $(mscorlib_dll)$(PLATFORM_AOT_SUFFIX)
 
-runtime_dep = $(topdir)/../mono/mini/mono
+# The $(dir $(RUNTIME)) is necessary to get path to the mono binary in case when we cross-compile
+# or just compile from a different directory than the top source dir
+runtime_dep = $(dir $(RUNTIME))/../mono/mini/mono
 
 PROGRAM_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
 LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
@@ -26,8 +28,8 @@ LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
 ifndef SKIP_AOT
 
 ifdef PLATFORM_AOT_SUFFIX
-Q_AOT=$(if $(V),,@echo "AOT [$(PROFILE)] $(notdir $(@))";)
-$(mcs_aot_image): $(mcs_exe) $(runtime_dep)
+Q_AOT=$(if $(V),,@echo "AOT     [$(PROFILE)] $(notdir $(@))";)
+$(mcs_aot_image): $(mcs_exe) $(mscorlib_dll) $(runtime_dep)
        $(Q_AOT) MONO_PATH='$(the_libdir)' > $(PROFILE)_aot.log 2>&1 $(RUNTIME) --aot=bind-to-runtime-version,outfile=$(mcs_aot_image) --debug $(mcs_exe) || cat $(PROFILE)_aot.log || (cat $(PROFILE)_aot.log; exit 1)
 
 $(mscorlib_aot_image): $(mscorlib_dll) $(runtime_dep)
@@ -44,7 +46,7 @@ all-local: $(mscorlib_aot_image) $(mcs_aot_image)
 install-local:
 endif
 
-ifeq ($(PROFILE),net_4_0)
+ifeq ($(PROFILE), $(DEFAULT_PROFILE))
 all-local: $(mscorlib_aot_image) $(mcs_aot_image)
 install-local:
        $(MKINSTALLDIRS) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
@@ -52,14 +54,6 @@ install-local:
        $(INSTALL_LIB) $(mcs_aot_image) $(DESTDIR)$(PROGRAM_INSTALL_DIR)
 endif
 
-# No mcs in net 2.0
-ifeq ($(PROFILE),net_2_0)
-all-local: $(mscorlib_aot_image)
-install-local:
-       $(MKINSTALLDIRS) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
-       $(INSTALL_LIB) $(mscorlib_aot_image) $(DESTDIR)$(LIBRARY_INSTALL_DIR)
-endif
-
 endif
 
 endif