File: check_makefiles

package info (click to toggle)
kde-i18n 4%3A2.2.2-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 341,220 kB
  • ctags: 327
  • sloc: sh: 10,878; perl: 2,910; cpp: 1,319; makefile: 1,016; python: 258
file content (52 lines) | stat: -rwxr-xr-x 1,792 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
dirs=`find */docs -type d ! -name CVS | grep -v templates`
for dir in $dirs; do 
   if test ! -f $dir/Makefile.am; then
	echo "copying Makefile.am into $dir"
       cp de/docs/Makefile.am $dir
   fi
   lang=`echo $dir | sed -e "s#^./##; s#/.*##"`
   if ! egrep -q "KDE_LANG *= *$lang\$" $dir/Makefile.am; then
      echo "wrong lang in $dir/Makefile.am"
      sed -e "s#^KDE_LANG.*#KDE_LANG = $lang#" $dir/Makefile.am > $dir/Makefile.am.new && mv $dir/Makefile.am.new $dir/Makefile.am
   fi
   if test ! -f $dir/.cvsignore; then
       cp de/docs/.cvsignore $dir 
   fi
done

dirs=`find */messages -type d ! -name CVS | grep -v messages/docs | grep -v others`
for dir in $dirs; do
   if test ! -f $dir/Makefile.am; then
        echo "copying Makefile.am into $dir"
       cp de/messages/Makefile.am $dir
   fi
   lang=`echo $dir | sed -e "s#^./##; s#/.*##"`
   if ! egrep -q "KDE_LANG *= *$lang" $dir/Makefile.am; then
      echo "wrong lang in $dir/Makefile.am"
      sed -e "s#^KDE_LANG.*#KDE_LANG = $lang#" $dir/Makefile.am > $dir/Makefile.am.new && mv $dir/Makefile.am.new $dir/Makefile.am
   fi
   if test ! -f $dir/.cvsignore; then
       cp de/messages/.cvsignore $dir
   fi
done

list=`find . -name Makefile.am  | grep '\./[^/]*/[^/]*/[^/]*/[^/]*/[^/]*/Makefile.am' `
for i in $list; do
  subdir=`echo $i | sed -e "s#.*docs/[^/]*/##; s#/Makefile.am##"`
  if egrep -q  'KDE_DOCS *= *AUTO' $i; then
    echo "patching $i"
    sed -e "s#KDE_DOCS *= *AUTO#KDE_DOCS = $subdir#" $i > $i.new && mv $i.new $i
  fi
done

list=`ls -1 */docs/kdelibs/api/Makefile.am 2>/dev/null`
for i in $list; do 
   if ! grep -q index.cache.bz2 $i; then
      echo "$i is not using rules"
   fi
done

list=`ls -1 */messages/others/Makefile.am 2>/dev/null`
for i in $list; do
   echo "$i shouldn't exist"
done