Add support for exclude files in extension modules.
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 6 Aug 2013 20:30:53 +0000 (16:30 -0400)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 6 Aug 2013 23:00:03 +0000 (19:00 -0400)
mcs/build/gensources.sh
mcs/build/library.make

index 153cba9f89214d0c4f10f88440cc337491d1488c..bc76b711d39879770af0f547f8186669c295c245 100644 (file)
@@ -4,6 +4,7 @@ outfile=$1
 incfile=$2
 excfile=$3
 extfile=$4
+extexcfile=$5
 
 process_includes_1() {
     sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' $1 > $2
@@ -39,16 +40,24 @@ fi
 sort -u $outfile.inc > $outfile.inc_s
 rm -f $outfile.inc
 
-if test -z "$excfile"; then
-    mv $outfile.inc_s $outfile
-else
+
+if test -n "$excfile"; then
     process_includes $excfile $outfile.exc
+fi
 
-    sort -u $outfile.exc > $outfile.exc_s
-    rm -f $outfile.exc
+if test -n "$extexcfile"; then
+    process_includes $extexcfile $outfile.ext_exc
+       cat $outfile.ext_exc >> $outfile.exc
+       rm -f $outfile.ext_exc
+fi
 
+if test -f $outfile.exc; then
+       sort -u $outfile.exc > $outfile.exc_s
+       rm -f $outfile.exc
     sort -m $outfile.inc_s $outfile.exc_s | uniq -u > $outfile
     rm -f $outfile.inc_s $outfile.exc_s
+else
+       mv $outfile.inc_s $outfile
 fi
 
 
index 8c43d43d62c7f98804ae3ff663b560380a534883..fdd94d023f316a4b56d93dc229d2641a7e75a2cd 100644 (file)
@@ -23,11 +23,18 @@ else
 EXTENSION_include = $(wildcard $(PROFILE)_opt_$(LIBRARY).sources)
 endif
 
+
+ifdef EXTENSION_MODULE
+EXTENSION_exclude = $(wildcard $(topdir)/../../mono-extensions/mcs/$(thisdir)/$(PROFILE)_$(LIBRARY).exclude.sources)
+else
+EXTENSION_exclude = $(wildcard $(PROFILE)_opt_$(LIBRARY).exclude.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 $(EXTENSION_include)
        @echo Creating the per profile list $@ ...
-       $(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)' '$(EXTENSION_include)'
+       $(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)' '$(EXTENSION_include)' '$(EXTENSION_exclude)'
 endif
 
 PLATFORM_excludes := $(wildcard $(LIBRARY).$(PLATFORM)-excludes)