Skip to content

Commit

Permalink
[Moon] Speed up the moonlight build by stripping it down to the bare …
Browse files Browse the repository at this point in the history
…basics
  • Loading branch information
Andreia Gaita committed Nov 24, 2010
1 parent ab6b372 commit 23f5d3a
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 8 deletions.
23 changes: 16 additions & 7 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS = -I .

MOONLIGHT_SUBDIRS = $(libgc_dir) eglib mono $(ikvm_native_dir) data
MOONLIGHT_SUBDIRS = $(libgc_dir) eglib/src mono

if CROSS_COMPILING
SUBDIRS = po $(libgc_dir) eglib mono $(ikvm_native_dir) data runtime scripts man samples msvc $(docs_dir)
Expand Down Expand Up @@ -72,17 +72,26 @@ bootstrap-world: compiler-tests
if MOONLIGHT
moon-do-build: config.h
@list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
echo "Making all in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) all); \
case "x$$subdir" in \
xmono ) target="moon-do-build";; \
* ) target="all";; \
esac; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw all
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-build)

moon-do-clean:
@list='$(MOONLIGHT_SUBDIRS)'; for subdir in $$list; do \
echo "Making clean in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) clean); \
case "x$$subdir" in \
xmono ) target="moon-do-clean";; \
* ) target="clean";; \
esac; \
echo "Making $$target in $$subdir"; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
cd $(mcs_topdir) && NO_DIR_CHECK=1 $(MAKE) PROFILE=moonlight_raw clean
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) moon-do-clean)

endif

win32getdeps:
Expand Down
25 changes: 24 additions & 1 deletion mono/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,30 @@ if CROSS_COMPILING
SUBDIRS = utils io-layer cil metadata arch $(interpreter_dir) mini dis
else
if MOONLIGHT
SUBDIRS = utils io-layer metadata arch $(interpreter_dir) mini
SUBDIRS = utils io-layer metadata arch 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 = utils io-layer cil metadata arch $(interpreter_dir) mini dis monograph tests benchmark profiler
endif
Expand Down
4 changes: 4 additions & 0 deletions mono/metadata/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ endif

if MOONLIGHT
moonlight_libraries = libmonoruntimemoon.la
moon-do-build: libmonoruntime-static.la libmonoruntimemoon.la
moon-do-clean:
-test -z "libmonoruntime-static.la" || rm -f libmonoruntime-static.la
-test -z "libmonoruntimemoon.la" || rm -f libmonoruntimemoon.la
endif

if SHARED_MONO
Expand Down
4 changes: 4 additions & 0 deletions mono/mini/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ noinst_LTLIBRARIES = libmono-static.la $(sgen_static_libraries)

if MOONLIGHT
noinst_LTLIBRARIES += libmono-moon.la
moon-do-build: $(BUILT_SOURCES) mono libmono-moon.la
moon-do-clean: maintainer-clean-generic
-test -z "mono$(EXEEXT)" || rm -f mono$(EXEEXT)
-test -z "libmono-moon.la" || rm -f libmono-moon.la
endif

if LOADED_LLVM
Expand Down
7 changes: 7 additions & 0 deletions runtime/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ test_profiles = $(build_profiles)
if MOONLIGHT
build_profiles += moonlight_raw
test_profiles += moonlight_raw

moon-do-build: $(SUPPORT_FILES)
cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' all-profiles

moon-do-clean:
cd $(mcs_topdir) && $(MAKE) NO_DIR_CHECK=1 PROFILES='moonlight_raw' CC='$(CC)' clean-profiles

endif

if INSTALL_4_0
Expand Down

0 comments on commit 23f5d3a

Please sign in to comment.