From: Glenn Morris Date: Fri, 22 Oct 2010 03:26:34 +0000 (-0700) Subject: * make-dist: Avoid listing .el files twice. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~45^2~526 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3dd02ea54c1591ca8088749dd29de1af1a7c6ba;p=emacs.git * make-dist: Avoid listing .el files twice. Don't try to run autoconf if --no-update. --- diff --git a/ChangeLog b/ChangeLog index ba4bf03c9d5..444413bd14a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-22 Glenn Morris + + * make-dist: Avoid listing .el files twice. Don't try to run + autoconf if --no-update. + 2010-10-20 Glenn Morris * make-dist: No longer create lisp/MANIFEST. diff --git a/make-dist b/make-dist index 8e00127bfe2..44895b91524 100755 --- a/make-dist +++ b/make-dist @@ -186,72 +186,66 @@ them, and try again." >&2 exit 1 fi -### Find where to run Emacs. -if [ $check = yes ]; -then - ### Check for .elc files with no corresponding .el file. +if [ $check = yes ]; then 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 \ - leim/[a-z]*/[a-z]*.el | sed 's/\.el$/.elc/' > /tmp/el + leim/[a-z]*/[a-z]*.el > /tmp/el + ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \ lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.elc \ lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.elc \ leim/[a-z]*/[a-z]*.elc > /tmp/elc - bogosities="`comm -13 /tmp/el /tmp/elc`" - if [ "${bogosities}" != "" ]; then + + ## Check for .elc files with no corresponding .el file. + sed 's/\.el$/.elc/' /tmp/el > /tmp/elelc + + bogosities="`comm -13 /tmp/elelc /tmp/elc`" + if [ x"${bogosities}" != x"" ]; then echo "The following .elc files have no corresponding .el files:" echo "${bogosities}" fi - rm -f /tmp/el /tmp/elc ### Check for .el files with no corresponding .elc file. - 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 \ - leim/[a-z]*/[a-z]*.el > /tmp/el - ls -1 lisp/[a-zA-Z]*.elc lisp/[a-z]*/[a-zA-Z0-9]*.elc \ - lisp/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \ - lisp/[a-z]*/[a-z]*/[a-z]*/[a-zA-Z0-9]*.el \ - leim/[a-z]*/[a-z]*.elc | sed 's/\.elc$/.el/' > /tmp/elc - losers="`comm -23 /tmp/el /tmp/elc`" + sed 's/\.elc$/.el/' /tmp/elc > /tmp/elcel + losers="`comm -23 /tmp/el /tmp/elcel`" + + rm -f /tmp/el /tmp/elc /tmp/elcel /tmp/elelc + bogosities= for file in $losers; do - if ! grep -q "no-byte-compile: t" $file; then - case $file in - site-init.el | site-load.el | site-start.el | default.el) - ;; - *) - bogosities="$file $bogosities" - ;; - esac - fi + grep -q "no-byte-compile: t" $file && continue + case $file in + site-init.el | site-load.el | site-start.el | default.el) continue ;; + esac + + bogosities="$file $bogosities" + done if [ x"${bogosities}" != x"" ]; then echo "The following .el files have no corresponding .elc files:" echo "${bogosities}" fi - rm -f /tmp/el /tmp/elc fi -### Make sure configure is newer than configure.in. -if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then - echo "\`./configure.in' is newer than \`./configure'" >&2 - echo "Running autoconf" >&2 - autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } -fi +if [ $update = yes ]; then -### Make sure src/stamp-h.in is newer than configure.in. -if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then - echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2 - echo "Running autoheader" >&2 - autoheader || { x=$?; echo Autoheader FAILED! >&2; exit $x; } - rm -f src/stamp-h.in - echo timestamp > src/stamp-h.in -fi + ## Make sure configure is newer than configure.in. + if [ "x`ls -t configure configure.in | sed q`" != "xconfigure" ]; then + echo "\`./configure.in' is newer than \`./configure'" >&2 + echo "Running autoconf" >&2 + autoconf || { x=$?; echo Autoconf FAILED! >&2; exit $x; } + fi + + ## Make sure src/stamp-h.in is newer than configure.in. + if [ "x`ls -t src/stamp-h.in configure.in | sed q`" != "xsrc/stamp-h.in" ]; then + echo "\`./configure.in' is newer than \`./src/stamp-h.in'" >&2 + echo "Running autoheader" >&2 + autoheader || { x=$?; echo Autoheader FAILED! >&2; exit $x; } + rm -f src/stamp-h.in + echo timestamp > src/stamp-h.in + fi -if [ $update = yes ]; -then echo "Updating Info files" (cd doc/emacs; make info) (cd doc/misc; make info) @@ -268,7 +262,7 @@ then echo "Recompiling Lisp files" $EMACS -batch -f batch-byte-recompile-directory lisp leim -fi +fi # $update = yes echo "Creating staging directory: \`${tempparent}'"