emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 129645a: Make make-dist --snapshot do some sanity


From: Glenn Morris
Subject: [Emacs-diffs] emacs-25 129645a: Make make-dist --snapshot do some sanity checks
Date: Thu, 8 Dec 2016 00:13:14 +0000 (UTC)

branch: emacs-25
commit 129645a7a7129f2a63c1daf2743c2d901460b9fa
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Make make-dist --snapshot do some sanity checks
    
    * make-dist: Snapshot mode no longer disables checks.
    Checks now includes checks for freshness.  (Bug#25084)
    Checks now exits with an error if problems were found.
---
 make-dist |   42 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/make-dist b/make-dist
index 1cd1a50..6182b49 100755
--- a/make-dist
+++ b/make-dist
@@ -100,7 +100,6 @@ while [ $# -gt 0 ]; do
       clean_up=yes
       make_tar=yes
       update=no
-      check=no
      ;;
 
     ## Include the test/ directory.
@@ -205,6 +204,8 @@ them, and try again." >&2
 fi
 
 if [ $check = yes ]; then
+  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
@@ -218,6 +219,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
@@ -226,6 +228,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=
@@ -239,9 +254,34 @@ 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/address@hidden //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
+
+  [ $error = yes ] && exit 1
 fi
 
 if [ $update = yes ]; then



reply via email to

[Prev in Thread] Current Thread [Next in Thread]