1 2GREP=${GREP:-grep} 3CC=${CC:-cc} 4AWK=${AWK:-awk} 5MV=${MV:=mv} 6RM=${RM:=rm} 7IN=$1 8OUT=$2 9 10trap "${RM} -f $OUT.tmp" EXIT 11 12$GREP -v '#include' $IN | \ 13$CC -E -D__KERNEL__ -dM - | \ 14$AWK -F"[ (]" ' 15/define/ { 16 print "#ifndef " $2; 17 print; 18 print "#endif"; 19}' > $OUT.tmp 20${MV} -f $OUT.tmp $OUT 21