common.h dependence leak

Kevin Huanpeng Du q24688 at gmail.com
Fri Nov 16 02:01:55 EST 2012


Hi, all:
I am study barebox, I want to remove all files not used, so I write this script.
here is a part of removing header (.h) files.
firstly, I didnot add LINE22 for speed.
but it not works for common.h.
I guess the file 'include/common.h' is leak of dependence in Makefiles.
Is anyone can check.

 1
  2 git checkout -f
  3 git clean -dfx
  4
  5
  6 hh=`find -name "*.h"`
  7
  8
  9 echo "CLEAN"
 10 make distclean  2>/dev/null 1>/dev/null
 11 wait
 12 echo "CONFIG"
 13 make -s omap3530_beagle_xload_defconfig  2>/dev/null 1>/dev/null
 14 wait
 15
 16 echo "START"
 17 for f in $hh
 18 do
 19
 20   rm $f
 21   echo -n -e "        $f\r"
 22   make clean 2>/dev/null 1>/dev/null   # LINE 22
 23   wait
 24   make -s -j24 2>/dev/null 1>/dev/null
 25   r=$?
 26   wait
 27
 28   if [ $r != 0 ]
 29   then
 30     echo "[KEEP]"
 31     git checkout $f
 32   else
 33     echo "[DEL]"
 34   fi
 35
 36
 37 done
 38



More information about the barebox mailing list