Skip to content

Commit

Permalink
Introduce hooks for parallel build scripts.
Browse files Browse the repository at this point in the history
	* configure.in: Add new configure option that allows a parallel set of
	build scripts to contribute to the current one.

	* mono/mini/Makefile.am: Include the parallel build scripts when generating
	Makefiles.

	* mcs/build/gensources.sh:
	* mcs/build/library.make: Probe for parallel source lists when building the
	class libs.
  • Loading branch information
kumpera committed Dec 10, 2012
1 parent b0e9fb6 commit c99f71c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
13 changes: 13 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,15 @@ fi
AC_ARG_ENABLE(executables, [ --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)

AC_ARG_ENABLE(extension-module, [ --enable-extension-module enables usage of the extension module], has_extension_module=$enableval, has_extension_module=no)
AM_CONDITIONAL([HAS_EXTENSION_MODULE], [test x$has_extension_module != xno])

if test x$has_extension_module != xno ; then
AC_DEFINE([ENABLE_EXTENSION_MODULE], 1, [Extension module enabled])
AC_MSG_NOTICE([Enabling mono extension module.])
fi


AC_MSG_CHECKING(for visibility __attribute__)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([[
Expand Down Expand Up @@ -3368,6 +3377,10 @@ fi
echo "MOONLIGHT = 1" >> $srcdir/$mcsdir/build/config.make
fi

if test x$has_extension_module != xno; then
echo "EXTENSION_MODULE = 1" >> $srcdir/$mcsdir/build/config.make
fi

default_profile=net_2_0
if test -z "$INSTALL_4_0_TRUE"; then :
default_profile=net_4_0
Expand Down
5 changes: 5 additions & 0 deletions mcs/build/gensources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
outfile=$1
incfile=$2
excfile=$3
extfile=$4

process_includes_1() {
sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' $1 > $2
Expand Down Expand Up @@ -31,6 +32,10 @@ rm -f $outfile.makefrag

process_includes $incfile $outfile.inc

if test x$extfile != x -a -f $extfile; then
cat $extfile >> $outfile.inc
fi

sort -u $outfile.inc > $outfile.inc_s
rm -f $outfile.inc

Expand Down
6 changes: 5 additions & 1 deletion mcs/build/library.make
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ PROFILE_excludes = $(wildcard $(PROFILE)_$(LIBRARY).exclude.sources)
sourcefile = $(depsdir)/$(PROFILE)_$(LIBRARY).sources
library_CLEAN_FILES += $(sourcefile)

ifdef EXTENSION_MODULE
EXTENSION_include=$(topdir)/../../mono-extensions/mcs/$(thisdir)/$(PROFILE)_$(LIBRARY).sources
endif

# Note, gensources.sh can create a $(sourcefile).makefrag if it sees any '#include's
# We don't include it in the dependencies since it isn't always created
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(topdir)/build/gensources.sh
@echo Creating the per profile list $@ ...
$(SHELL) $(topdir)/build/gensources.sh $@ $(PROFILE_sources) $(PROFILE_excludes)
$(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)' '$(EXTENSION_include)'
endif

PLATFORM_excludes := $(wildcard $(LIBRARY).$(PLATFORM)-excludes)
Expand Down
4 changes: 4 additions & 0 deletions mono/mini/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -772,3 +772,7 @@ patch-automake:

tags:
etags -o TAGS `find .. -name "*.h" -o -name "*.c"`

if HAS_EXTENSION_MODULE
include $(top_srcdir)/../mono-extensions/mono/mini/Makefile.am
endif

0 comments on commit c99f71c

Please sign in to comment.