g3dvl: Use sobel filter for chroma interpolation
[mesa/nouveau-pmpeg.git] / bin / confdiff.sh
blob568fcd6d56ec28e7a456ce0792056bba83c843a7
1 #!/bin/bash -e
3 usage()
5 echo "Usage: $0 <target1> <target2>"
6 echo "Highlight differences between Mesa configs"
7 echo "Example:"
8 echo " $0 linux linux-x86"
11 die()
13 echo "$@" >&2
14 return 1
17 case "$1" in
18 -h|--help) usage; exit 0;;
19 esac
21 [ $# -lt 2 ] && die 2 targets needed. See $0 --help
22 target1=$1
23 target2=$2
25 topdir=$(cd "`dirname $0`"/..; pwd)
26 cd "$topdir"
28 [ -f "./configs/$target1" ] || die Missing configs/$target1
29 [ -f "./configs/$target2" ] || die Missing configs/$target2
31 trap 'rm -f "$t1" "$t2"' 0
33 t1=$(mktemp)
34 t2=$(mktemp)
36 make -f- -n -p <<EOF | sed '/^# Not a target/,/^$/d' > $t1
37 TOP = .
38 include \$(TOP)/configs/$target1
39 default:
40 EOF
42 make -f- -n -p <<EOF | sed '/^# Not a target/,/^$/d' > $t2
43 TOP = .
44 include \$(TOP)/configs/$target2
45 default:
46 EOF
48 diff -pu -I'^#' $t1 $t2