Merge pull request #444 from knocte/xbuild_improvements
[mono.git] / mono / Makefile.am
index 17162963cd1ea542eef8a00faa262ce495d1fd6c..2d796f1c480105b4658f3f3cb75993c6ee6a9e85 100644 (file)
@@ -1,8 +1,33 @@
-# the handles dir doesn't apply to windows
-if PLATFORM_WIN32
-SUBDIRS = utils io-layer monoburg os metadata cil dis \
-       arch monograph interpreter mini tests benchmark profiler
+if CROSS_COMPILING
+SUBDIRS = arch utils io-layer cil metadata $(interpreter_dir) mini dis
 else
-SUBDIRS = utils io-layer monoburg os metadata cil dis \
-       arch monograph interpreter mini tests benchmark handles profiler
+if MOONLIGHT
+SUBDIRS = arch utils io-layer metadata mini
+
+moon-do-build:
+       @list='$(SUBDIRS)'; for subdir in $$list; do \
+         case "x$$subdir" in \
+               xmetadata ) target="moon-do-build" ;; \
+               xmini ) target="moon-do-build" ;; \
+               * ) target="all" ;; \
+         esac; \
+         echo "Making $$target in $$subdir"; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
+    done;
+
+moon-do-clean:
+       @list='$(SUBDIRS)'; for subdir in $$list; do \
+         case "x$$subdir" in \
+               xmetadata ) target="moon-do-clean" ;; \
+               xmini ) target="moon-do-clean" ;; \
+               * ) target="clean" ;; \
+         esac; \
+         echo "Making $$target in $$subdir"; \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
+    done;
+
+else
+SUBDIRS = arch utils io-layer cil metadata $(interpreter_dir) mini dis monograph tests benchmark profiler
+endif
 endif
+DIST_SUBDIRS = arch utils io-layer cil metadata interpreter mini dis monograph tests benchmark profiler