Introduce hooks for parallel build scripts.
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 10 Dec 2012 22:15:16 +0000 (17:15 -0500)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 10 Dec 2012 23:09:25 +0000 (18:09 -0500)
* 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.

configure.in
mcs/build/gensources.sh
mcs/build/library.make
mono/mini/Makefile.am

index 1af6871b2f0bd01349039d20801550c3666c1178..b00c777c34be82240014c6a5d670511624278ec8 100644 (file)
@@ -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([[
@@ -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
index 61639e54a297cc6f7aa7b00bad3a9b00a026ed0f..816b8296f6cbb27cab3fef6e21df39208dc1158d 100644 (file)
@@ -3,6 +3,7 @@
 outfile=$1
 incfile=$2
 excfile=$3
+extfile=$4
 
 process_includes_1() {
     sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' $1 > $2
@@ -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
 
index 768149e9d1066b1ba99eab7e122d86dfef6181d7..95ecee0ce64d6da6ad414a0d33c389a8991986db 100644 (file)
@@ -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)
index f4e6a71804e9417ee4bd9015c00ece2a761d9c31..e4f5ec9c58800e2c05723586a06ff00560ae361e 100644 (file)
@@ -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