X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fbuild%2Fgensources.sh;h=2eb4995bdd80c6569867178350c70fdaad71a2b6;hb=2002994d0c06860d22253edbb7bae0ddcda7df44;hp=bc76b711d39879770af0f547f8186669c295c245;hpb=4ec59639b74b37344513873532a12ec68c90f601;p=mono.git diff --git a/mcs/build/gensources.sh b/mcs/build/gensources.sh index bc76b711d39..2eb4995bdd8 100644 --- a/mcs/build/gensources.sh +++ b/mcs/build/gensources.sh @@ -34,7 +34,9 @@ rm -f $outfile.makefrag process_includes $incfile $outfile.inc if test x$extfile != x -a -f "$extfile"; then - cat $extfile >> $outfile.inc + process_includes $extfile $outfile.ext.inc + cat $outfile.ext.inc >> $outfile.inc + rm -f $outfile.ext.inc fi sort -u $outfile.inc > $outfile.inc_s @@ -52,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