incfile=$2
excfile=$3
extfile=$4
+extexcfile=$5
process_includes_1() {
sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' $1 > $2
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
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)