2 # Piggy list consistency checker
7 TEMPFILE
=/tmp
/vlclist.tmp.$$
14 echo "------------------------------------"
15 echo "Checking that all modules are listed"
16 echo "------------------------------------"
20 for modfile
in `find . -name "Modules.am" -o -name "Makefile.am"`
22 for module
in `awk '/^SOURCES_/{sub(/SOURCES_/,"",$1); print $1}' "$modfile"`\
23 `awk '/^lib.*_plugin_la_SOURCES/{sub(/lib/,""); sub(/_plugin_la_SOURCES/,"",$1); print $1}' "$modfile"`
25 echo $module >> $TEMPFILE
26 if ! grep -q " \* $module:" $LISTFILE
28 echo "$module exists in $modfile, but not listed"
42 echo "--------------------------------------"
43 echo "Checking that all listed modules exist"
44 echo "--------------------------------------"
46 for module
in `awk -F'[ :]' '/ \* /{print $3}' $LISTFILE`
48 if ! grep -wq $module $TEMPFILE
51 echo "$module is listed but does not exist"
61 echo "-------------------------------"
62 echo "Checking for alphabetical order"
63 echo "-------------------------------"
65 grep " \* " $LISTFILE | LC_COLLATE
=C LC_CTYPE
=C
sort -c && echo "OK"
69 echo "`sort -u $TEMPFILE | wc -l` modules listed in Modules.am files"