10f40c3f1SAriff Abdullah 20f40c3f1SAriff AbdullahGREP=${GREP:-grep} 30f40c3f1SAriff AbdullahCC=${CC:-cc} 40f40c3f1SAriff AbdullahAWK=${AWK:-awk} 50f40c3f1SAriff AbdullahMV=${MV:=mv} 60f40c3f1SAriff AbdullahRM=${RM:=rm} 70f40c3f1SAriff AbdullahIN=$1 80f40c3f1SAriff AbdullahOUT=$2 90f40c3f1SAriff Abdullah 100f40c3f1SAriff Abdullahtrap "${RM} -f $OUT.tmp" EXIT 110f40c3f1SAriff Abdullah 120f40c3f1SAriff Abdullah$GREP -v '#include' $IN | \ 130f40c3f1SAriff Abdullah$CC -E -D__KERNEL__ -dM - | \ 140f40c3f1SAriff Abdullah$AWK -F"[ (]" ' 150f40c3f1SAriff Abdullah/define/ { 160f40c3f1SAriff Abdullah print "#ifndef " $2; 170f40c3f1SAriff Abdullah print; 180f40c3f1SAriff Abdullah print "#endif"; 190f40c3f1SAriff Abdullah}' > $OUT.tmp 200f40c3f1SAriff Abdullah${MV} -f $OUT.tmp $OUT 21