aboutsummaryrefslogtreecommitdiffstats
path: root/make-dist
diff options
context:
space:
mode:
authorGlenn Morris2016-12-07 19:13:05 -0500
committerGlenn Morris2016-12-07 19:13:05 -0500
commit129645a7a7129f2a63c1daf2743c2d901460b9fa (patch)
tree504a75d29fa795645333f5b1dd6843dd781b1b71 /make-dist
parenteeecac7ab9d1f8c3a29cffe4586e5fd2414dd671 (diff)
downloademacs-129645a7a7129f2a63c1daf2743c2d901460b9fa.tar.gz
emacs-129645a7a7129f2a63c1daf2743c2d901460b9fa.zip
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.
Diffstat (limited to 'make-dist')
-rwxr-xr-xmake-dist42
1 files changed, 41 insertions, 1 deletions
diff --git a/make-dist b/make-dist
index 1cd1a50d75a..6182b4931a1 100755
--- a/make-dist
+++ b/make-dist
@@ -100,7 +100,6 @@ while [ $# -gt 0 ]; do
100 clean_up=yes 100 clean_up=yes
101 make_tar=yes 101 make_tar=yes
102 update=no 102 update=no
103 check=no
104 ;; 103 ;;
105 104
106 ## Include the test/ directory. 105 ## Include the test/ directory.
@@ -205,6 +204,8 @@ them, and try again." >&2
205fi 204fi
206 205
207if [ $check = yes ]; then 206if [ $check = yes ]; then
207 error=no
208
208 ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \ 209 ls -1 lisp/[a-zA-Z]*.el lisp/[a-z]*/[a-zA-Z0-9]*.el \
209 lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \ 210 lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \
210 lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el > /tmp/el 211 lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el > /tmp/el
@@ -218,6 +219,7 @@ if [ $check = yes ]; then
218 219
219 bogosities=`comm -13 /tmp/elelc /tmp/elc` 220 bogosities=`comm -13 /tmp/elelc /tmp/elc`
220 if [ x"${bogosities}" != x"" ]; then 221 if [ x"${bogosities}" != x"" ]; then
222 error=yes
221 echo "The following .elc files have no corresponding .el files:" 223 echo "The following .elc files have no corresponding .el files:"
222 echo "${bogosities}" 224 echo "${bogosities}"
223 fi 225 fi
@@ -226,6 +228,19 @@ if [ $check = yes ]; then
226 sed 's/\.elc$/.el/' /tmp/elc > /tmp/elcel 228 sed 's/\.elc$/.el/' /tmp/elc > /tmp/elcel
227 losers=`comm -23 /tmp/el /tmp/elcel` 229 losers=`comm -23 /tmp/el /tmp/elcel`
228 230
231 bogosities=
232 while read elc; do
233 el=`echo $elc | sed 's/c$//'`
234 [ -e $el ] || continue
235 [ $elc -nt $el ] || bogosities="$bogosities $elc"
236 done < /tmp/elc
237
238 if [ x"${bogosities}" != x"" ]; then
239 error=yes
240 echo "The following .elc files are older than their .el files:"
241 echo "${bogosities}"
242 fi
243
229 rm -f /tmp/el /tmp/elc /tmp/elcel /tmp/elelc 244 rm -f /tmp/el /tmp/elc /tmp/elcel /tmp/elelc
230 245
231 bogosities= 246 bogosities=
@@ -239,9 +254,34 @@ if [ $check = yes ]; then
239 254
240 done 255 done
241 if [ x"${bogosities}" != x"" ]; then 256 if [ x"${bogosities}" != x"" ]; then
257 error=yes
242 echo "The following .el files have no corresponding .elc files:" 258 echo "The following .el files have no corresponding .elc files:"
243 echo "${bogosities}" 259 echo "${bogosities}"
244 fi 260 fi
261
262
263 ## This is only a crude check, eg it does not handle .info
264 ## files with multiple .texi source files.
265 find doc -name '*.texi' > /tmp/el
266
267 bogosities=
268 while read texi; do
269 info=`sed -n 's/^@setfilename //p' $texi | sed 's|.*info/||'`
270 [ x"${info}" != x"" ] || continue
271 info=info/$info
272 [ -e $info ] || continue
273 [ $info -nt $texi ] || bogosities="$bogosities $info"
274 done < /tmp/el
275
276 rm -f /tmp/el
277
278 if [ x"${bogosities}" != x"" ]; then
279 error=yes
280 echo "The following .info files are older than their .texi files:"
281 echo "${bogosities}"
282 fi
283
284 [ $error = yes ] && exit 1
245fi 285fi
246 286
247if [ $update = yes ]; then 287if [ $update = yes ]; then