X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fbuild%2Fgensources.sh;h=14a0a01db59d07b4503b9a5d1ae8882e25442524;hb=3e69ff3ae72acec33c471236da49ed6c78b26dc4;hp=db7bf638bed6ba87b23dda367abd1e874c72f0a1;hpb=12461baf50da00c5d30f757af0e1891d7ebbef3b;p=mono.git diff --git a/mcs/build/gensources.sh b/mcs/build/gensources.sh index db7bf638bed..14a0a01db59 100644 --- a/mcs/build/gensources.sh +++ b/mcs/build/gensources.sh @@ -43,7 +43,7 @@ sort -u $outfile.inc > $outfile.inc_s rm -f $outfile.inc -if test -n "$excfile"; then +if test -n "$excfile" -a -f "$excfile"; then process_includes $excfile $outfile.exc fi @@ -54,10 +54,22 @@ if test -n "$extexcfile"; then fi if test -f $outfile.exc; then + # So what we're doing below with uniq -u is that we take + # lines that have not been duplicated. This computes the + # symmetric difference between the files. This is not + # what we want. If a file is in the excludes but not in + # the sources, we want that file not to show up. By duplicating the + # excludes, we ensure that we won't end up in this failure state. 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 + + # Duplicate excludes + cat $outfile.exc_s >> $outfile.exc_s_dup + cat $outfile.exc_s >> $outfile.exc_s_dup + + rm -f $outfile.exc $outfile.exc_s + + cat $outfile.inc_s $outfile.exc_s_dup | sort | uniq -u > $outfile + rm -f $outfile.inc_s $outfile.exc_s_dup else mv $outfile.inc_s $outfile fi