diff options
Diffstat (limited to 'make-dist')
-rwxr-xr-x | make-dist | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/make-dist b/make-dist index b0a8dff2cc7..795cca8ed38 100755 --- a/make-dist +++ b/make-dist @@ -101,7 +101,6 @@ while [ $# -gt 0 ]; do clean_up=yes make_tar=yes update=no - check=no ;; ## Include the test/ directory. @@ -211,6 +210,11 @@ them, and try again." >&2 fi if [ $check = yes ]; then + + echo "Sanity checking (use --no-check to disable this)..." + + error=no + ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \ lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \ lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el > /tmp/el @@ -224,6 +228,7 @@ if [ $check = yes ]; then bogosities=`comm -13 /tmp/elelc /tmp/elc` if [ x"${bogosities}" != x"" ]; then + error=yes echo "The following .elc files have no corresponding .el files:" echo "${bogosities}" fi @@ -232,6 +237,19 @@ if [ $check = yes ]; then sed 's/\.elc$/.el/' /tmp/elc > /tmp/elcel losers=`comm -23 /tmp/el /tmp/elcel` + bogosities= + while read elc; do + el=`echo $elc | sed 's/c$//'` + [ -e $el ] || continue + [ $elc -nt $el ] || bogosities="$bogosities $elc" + done < /tmp/elc + + if [ x"${bogosities}" != x"" ]; then + error=yes + echo "The following .elc files are older than their .el files:" + echo "${bogosities}" + fi + rm -f /tmp/el /tmp/elc /tmp/elcel /tmp/elelc bogosities= @@ -245,9 +263,45 @@ if [ $check = yes ]; then done if [ x"${bogosities}" != x"" ]; then + error=yes echo "The following .el files have no corresponding .elc files:" echo "${bogosities}" fi + + + ## This is only a crude check, eg it does not handle .info + ## files with multiple .texi source files. + find doc -name '*.texi' > /tmp/el + + bogosities= + while read texi; do + info=`sed -n 's/^@setfilename //p' $texi | sed 's|.*info/||'` + [ x"${info}" != x"" ] || continue + info=info/$info + [ -e $info ] || continue + [ $info -nt $texi ] || bogosities="$bogosities $info" + done < /tmp/el + + rm -f /tmp/el + + if [ x"${bogosities}" != x"" ]; then + error=yes + echo "The following .info files are older than their .texi files:" + echo "${bogosities}" + fi + + ## This exits with non-zero status if any .info files need + ## rebuilding. + if [ -e Makefile ]; then + echo "Checking to see if info files are up-to-date..." + make --question info || error=yes + fi + + if [ $error = yes ]; then + echo "Failed checks" >&2 + exit 1 + fi + fi if [ $update = yes ]; then |