automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.2-22


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.12.2-220-g3e472de
Date: Sun, 05 Aug 2012 09:42:18 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=3e472de16e7cc0f10d2dc339f4308eb3ceadf55d

The branch, master has been updated
       via  3e472de16e7cc0f10d2dc339f4308eb3ceadf55d (commit)
       via  670b3bd58c6afa0c3e29107b7634a6b9091d2bcf (commit)
       via  9158d39d524ab4c10aa41dbed1fc5b6a3b54188a (commit)
       via  b9ee5dfe75d1a524cfb0fc925851dcc13cfbfa0b (commit)
       via  48e99a7ee6b2ef12bb5d7861f5b71ccd6f69c6e9 (commit)
       via  56cd2dda0edcc4089954fd560712d762b80cebe5 (commit)
       via  1ee9c78b296198bcec16bd9a9f01511ded9780e0 (commit)
       via  3645d0ff5e0e4ee1163b97cf2a498246a014a85c (commit)
       via  6fc5c9acb05b5e42ca02b861568ee191876dea6f (commit)
       via  fec53184220122d7ff8c88757be4d2eaafec13b2 (commit)
       via  7cd72e5d9283fcd778e7d694d3a420b934e842d3 (commit)
       via  226be35fe1dad069485d9fa45c3fc3389f3e92a2 (commit)
       via  9bed1c1024afc2ddf5b3fb719b8320fa16ad18df (commit)
       via  2f88456d63e72f9a82410873f8f041814097dbd4 (commit)
      from  12f0caf6d2d2c013c03200a12449d5f97428e0cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3e472de16e7cc0f10d2dc339f4308eb3ceadf55d
Merge: 670b3bd b9ee5df
Author: Stefano Lattarini <address@hidden>
Date:   Sun Aug 5 11:06:16 2012 +0200

    Merge branch 'elisp-work'
    
    * elisp-work:
      news: document all the recent elisp-related changes and improvements
      coverage: byte-compiling elisp files in different subdirectories
      elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation
      elisp: --batch implies -q, remove -q
      elisp: support elisp files in subdirectories properly
      elisp: simplify suffix rules using emacs '-L' option
      elisp: no need to "absolutize" $(srcdir) and $(builddir) ...
      elisp: prefer $(builddir) files over $(srcdir) ones
      elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)
      coverage: elisp path contains $(srcdir) and $(builddir)
      coverage: emacs lisp files in subdirectories

commit 670b3bd58c6afa0c3e29107b7634a6b9091d2bcf
Merge: 12f0caf 9158d39
Author: Stefano Lattarini <address@hidden>
Date:   Sun Aug 5 11:03:40 2012 +0200

    Merge branch 'maint'
    
    * maint:
      tests: cater to OpenSolaris 'zip'

commit b9ee5dfe75d1a524cfb0fc925851dcc13cfbfa0b
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 4 15:52:12 2012 +0200

    news: document all the recent elisp-related changes and improvements
    
    * NEWS (Elisp byte-compilation): Here.  Also notice that the recent
    changes have fixed the long-standing (almost two years old!) automake
    bug#7441.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 48e99a7ee6b2ef12bb5d7861f5b71ccd6f69c6e9
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 4 15:29:21 2012 +0200

    coverage: byte-compiling elisp files in different subdirectories
    
    Where a '.el' file in a subdirectory might require a '.el' file in
    another one.  This does not work out of the box, but can be made to
    work with a judicious use of $(AM_ELCFLAGS) (just introduced in the
    previous commit).
    
    * t/lisp-subdir-mix.sh: New test.
    * t/list-of-tests.mk: Add it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 56cd2dda0edcc4089954fd560712d762b80cebe5
Author: Stefano Lattarini <address@hidden>
Date:   Sat Aug 4 14:56:27 2012 +0200

    elisp: honour AM_ELCFLAFS and ELCFLAGS in byte-compilation
    
    * lib/am/lisp.am (.el.elc): Add "$(AM_ELCFLAFS) $(ELCFLAGS)"
    to the emacs command line.
    * t/lisp-flags.sh: New test.
    * t/list-of-tests.mk: Add it.
    * doc/automake.texi (Emacs Lisp): Update.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 1ee9c78b296198bcec16bd9a9f01511ded9780e0
Author: Jack Kelly <address@hidden>
Date:   Mon Jul 16 10:31:27 2012 +1000

    elisp: --batch implies -q, remove -q
    
    According to the emacs manual[1], --batch implies -q, so there's no
    need to pass -q when compiling elisp.
    
    * lib/am/lisp.am: Remove -q from $(EMACS) call.
    
    [1]: http://gnu.org/s/emacs/manual/html_node/emacs/Initial-Options.html
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 3645d0ff5e0e4ee1163b97cf2a498246a014a85c
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jul 14 23:14:45 2012 +0200

    elisp: support elisp files in subdirectories properly
    
    For more reference, see:
    <http://lists.gnu.org/archive/html/automake/2009-10/msg00013.html>
    <http://thread.gmane.org/gmane.comp.sysutils.automake.bugs/4772>
    
    * lib/am/lisp.am (.el.elc): If the file being byte-compiled is in
    a subdirectory, add that (both as a subdirectory of the builddir
    and the srcdir) to the emacs load path.  While we are at it (and
    for consistency), drop quoting of $(srcdir) and $(builddir), since
    those variables are ensured (by configure-time checks) not to
    contain white space nor shell metacharacters.
    * t/list-of-tests.mk (XFAIL_TESTS): Add 't/lisp-subdir.sh' and
    't/lisp-subdir2.sh', since they now passes.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 6fc5c9acb05b5e42ca02b861568ee191876dea6f
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jul 14 22:46:20 2012 +0200

    elisp: simplify suffix rules using emacs '-L' option
    
    * lib/am/lisp.am (.el.elc): Use '-L dir' instead of calling '--eval' to
    explicitly append to the 'load-path' variable.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit fec53184220122d7ff8c88757be4d2eaafec13b2
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jul 14 22:42:48 2012 +0200

    elisp: no need to "absolutize" $(srcdir) and $(builddir) ...
    
    * lib/am/lisp.am (.el.elc): ... here: we don't chdir around anyway,
    nor move or copy around our source '.el' files.  Update comments,
    and re-wrap them while we are at it.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 7cd72e5d9283fcd778e7d694d3a420b934e842d3
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jul 14 22:33:40 2012 +0200

    elisp: prefer $(builddir) files over $(srcdir) ones
    
    * lib/am/lisp.am (.el.elc): Here.  This better respects VPATH spirit.
    Adjust and extends comments.
    * t/list-of-tests.mk (XFAIL_TESTS): Remove 't/lisp-loadpath.sh', which
    now passes.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 226be35fe1dad069485d9fa45c3fc3389f3e92a2
Author: Jack Kelly <address@hidden>
Date:   Sat Jul 14 21:52:43 2012 +1000

    elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)
    
    Motivated by automake bug#11806.
    
    Traditionally, automake byte-compiled emacs-lisp '.el' files by invoking
    'elisp-comp' on all of them in a bulk; this involved complex timestamping
    and file-locking logic.  It was also brittle in any slightly-unusual
    setup, because 'elisp-comp' operated by copying all of the elisp files
    to be compiled into a temporary sub-directory and compiling them in there,
    the copying the resulting byte-compile files back in the build directory.
    
    This patch removes all of that juggling and chicanery in favour of
    defining a much simpler '.el.elc' suffix rule.  Not only this is simpler,
    but it also interacts better with "make -jN" calls, which are becoming
    more and more common and useful on today's increasingly multicore systems.
    
    * Makefile.am (dist_script_DATA): Remove 'elisp-comp'.
    * automake.in (@common_files): Likewise.
    (handle_emacs_lisp): Do not require 'elisp-comp'.
    * doc/automake.texi: Remove references to 'elisp-comp'.
    * lib/am/lisp.am: Define elisp compilation via a suffix rule; this
    basically amounts to a complete re-write of the lisp byte-compilation
    rules.
    * lib/elisp-comp: Remove.
    * t/add-missing.tap: Remove elisp-comp test.
    * t/dist-auxdir-many-subdirs.sh: Remove reference to elisp-comp.
    * t/primary-prefix-invalid-couples.tap: Likewise.
    * t/primary-prefix-valid-couples.sh: Likewise.
    * t/lisp4.sh: Remove reference to elc-stamp.
    * t/lisp5.sh: Likewise.
    * t/lisp6.sh: Likewise.
    * t/lisp3.sh: Likewise.  Also remove the recompilation check that
    involves a (message) call.
    * t/lisp7.sh: Remove check for "Warnings can be ignored".  Remove
    reference to elc-stamp.
    * t/lisp8.sh: Likewise.
    * t/lispdry.sh: Remove references to elc-stamp.
    
    Acked-by: Stefano Lattarini <address@hidden>
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 9bed1c1024afc2ddf5b3fb719b8320fa16ad18df
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jul 14 21:54:03 2012 +0200

    coverage: elisp path contains $(srcdir) and $(builddir)
    
    * t/lisp-loadpath.sh: Check that.  Also check that, in true VPATH
    spirit, elisp files in the build directory are preferred to those
    in the source directory.  This test currently fails.
    * t/list-of-tests.mk (handwritten_TESTS): Add the new test.
    (XFAIL_TESTS): Likewise.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 2f88456d63e72f9a82410873f8f041814097dbd4
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jul 14 20:55:30 2012 +0200

    coverage: emacs lisp files in subdirectories
    
    * t/lisp-subdir.sh, t/lisp-subdir2.sh: New tests, still failing.
    * t/list-of-files.mk (handwritten_TESTS, XFAIL_TESTS): Add them.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                             |    1 -
 NEWS                                    |   24 ++++++++
 automake.in                             |    4 +-
 doc/automake.texi                       |    9 +--
 lib/am/lisp.am                          |   78 +++++++------------------
 lib/elisp-comp                          |   93 ------------------------------
 t/add-missing.tap                       |   11 ----
 t/dist-auxdir-many-subdirs.sh           |    3 -
 t/dist-formats.tap                      |    8 ++-
 t/{python7.sh => lisp-flags.sh}         |   23 ++++---
 t/{lisp-pr11806.sh => lisp-loadpath.sh} |   26 +++++++--
 t/lisp-subdir-mix.sh                    |   96 +++++++++++++++++++++++++++++++
 t/lisp-subdir.sh                        |   80 +++++++++++++++++++++++++
 t/lisp-subdir2.sh                       |   78 +++++++++++++++++++++++++
 t/lisp3.sh                              |   10 ---
 t/lisp4.sh                              |    1 -
 t/lisp5.sh                              |    1 -
 t/lisp6.sh                              |    5 --
 t/lisp7.sh                              |    2 -
 t/lisp8.sh                              |    4 -
 t/lispdry.sh                            |    4 +-
 t/list-of-tests.mk                      |    5 ++
 t/primary-prefix-invalid-couples.tap    |    1 -
 t/primary-prefix-valid-couples.sh       |    1 -
 24 files changed, 353 insertions(+), 215 deletions(-)
 delete mode 100755 lib/elisp-comp
 copy t/{python7.sh => lisp-flags.sh} (69%)
 copy t/{lisp-pr11806.sh => lisp-loadpath.sh} (61%)
 create mode 100755 t/lisp-subdir-mix.sh
 create mode 100755 t/lisp-subdir.sh
 create mode 100755 t/lisp-subdir2.sh

diff --git a/Makefile.am b/Makefile.am
index 6ff7e71..e629787 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -135,7 +135,6 @@ dist_script_DATA = \
   lib/mdate-sh \
   lib/missing \
   lib/mkinstalldirs \
-  lib/elisp-comp \
   lib/ylwrap \
   lib/depcomp \
   lib/compile \
diff --git a/NEWS b/NEWS
index f308752..1f1955d 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,30 @@ New in 1.13:
 
   - All the "old alias" macros in 'm4/obsolete.m4' have been removed.
 
+* Elisp byte-compilation:
+
+  - The byte compilation of '.el' files into '.elc' files is now done
+    with a suffix rule.  This has simplified the compilation process, and
+    more importantly made it less brittle.  The downside is that emacs is
+    now invoked once for each '.el' files, which cause some noticeable
+    slowdowns.  These should however be mitigated on multicore machines
+    (which are becoming the norm today) if concurrent  make ("make -j")
+    is used.
+
+  - Elisp files placed in a subdirectory are now byte-compiled to '.elc'
+    files in the same subdirectory; for example, byte-compiling of file
+    'sub/foo.el' file will result in 'sub/foo.elc' rather than in
+    'foo.elc'.  This behaviour is backward-incompatible with older
+    Automake versions, but it is more natural and more sane.  See also
+    automake bug#7441.
+
+  - The Emacs invocation performing byte-compilation of '.el' files honors
+    the $(AM_ELCFLAGS) and $(ELCFLAGS) variables; as typical, the former
+    one is  developer-reserved and the latter one user-reserved.
+
+  - The 'elisp-comp' script, once provided by Automake, has been rendered
+    obsoleted by the just-described changes, and thus removed.
+
 * Changes to Automake-generated testsuite harnesses:
 
   - The parallel testsuite harness (previously only enabled by the
diff --git a/automake.in b/automake.in
index 48ece7f..91133bd 100644
--- a/automake.in
+++ b/automake.in
@@ -231,7 +231,7 @@ my @common_files =
     (qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB
        COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO
        ar-lib compile config.guess config.rpath
-       config.sub depcomp elisp-comp install-sh libversion.in mdate-sh
+       config.sub depcomp install-sh libversion.in mdate-sh
        missing mkinstalldirs py-compile texinfo.tex ylwrap),
      @libtool_files, @libtool_sometimes);
 
@@ -4955,8 +4955,6 @@ sub handle_emacs_lisp
 
   require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE,
                     'EMACS', 'lispdir');
-  require_conf_file ($elfiles[0][0], FOREIGN, 'elisp-comp');
-  &define_variable ('elisp_comp', "$am_config_aux_dir/elisp-comp", INTERNAL);
 }
 
 # Handle Python
diff --git a/doc/automake.texi b/doc/automake.texi
index 251c26b..76e84e0 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -2281,9 +2281,6 @@ generate not only the desired output but also dependency 
information
 that is then used by the automatic dependency tracking feature
 (@pxref{Dependencies}).
 
address@hidden elisp-comp
-This program is used to byte-compile Emacs Lisp code.
-
 @item install-sh
 This is a replacement for the @command{install} program that works on
 platforms where @command{install} is unavailable or unusable.
@@ -2929,7 +2926,6 @@ Automake will look for various helper scripts, such as
 @file{config.guess},
 @file{config.sub},
 @file{depcomp},
address@hidden,
 @file{compile},
 @file{install-sh},
 @file{ltmain.sh},
@@ -7473,7 +7469,10 @@ Lisp sources are not distributed by default.  You can 
prefix the
 distributed.
 
 Automake will byte-compile all Emacs Lisp source files using the Emacs
-found by @code{AM_PATH_LISPDIR}, if any was found.
+found by @code{AM_PATH_LISPDIR}, if any was found.  When performing such
+byte-compilation, the flags specified in the (developer-reserved)
address@hidden and (user-reserved) @code{ELCFLAGS} make variables
+will be passed to the Emacs invocation.
 
 Byte-compiled Emacs Lisp files are not portable among all versions of
 Emacs, so it makes sense to turn this off if you expect sites to have
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 4a96eb0..fc3575b 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -22,60 +22,28 @@ endif %?INSTALL%
 ## Building.  ##
 ## ---------- ##
 
-elc-stamp: $(LISP)
-       @echo 'WARNING: Warnings can be ignored. :-)'
-       @rm -f elc-temp && touch elc-temp
-       if test "$(EMACS)" != no; then \
-## Make sure "$@" isn't empty initially.
-         set x; \
-## Populate "$@" with elisp files (found in the current directory
-## or in $srcdir).
-         list='$(LISP)'; for p in $$list; do \
-           if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-           set x "$$@" "$$d$$p"; shift; \
-         done; \
-## Finally call elisp-comp for all files.
-         shift; \
-         abs_srcdir="$(abs_srcdir)" EMACS="$(EMACS)" $(SHELL) \
-           $(elisp_comp) "$$@" || exit 1; \
-       else : ; fi
-       @mv -f elc-temp $@
-
-## Do not use $(ELCFILES) as target, because it may have been emptied
-## by the user (to disable byte-compilation), and POSIX does not allow
-## an empty target.
-$(am__ELCFILES): elc-stamp
-## Recover from the removal of address@hidden
-##
-## Do not call "make elc-stamp" if emacs is not available, because it would
-## be useless.
-##
-## If "make -n" is called, do not execute any command in the recipe that
-## changes the tree; however, invoke the recursive make for debuggability.
-       @if $(am__make_dryrun); then dry=:; else dry=; fi; \
-       if test "$(EMACS)" != no && test ! -f $@; then \
-## If "make -j" is used and more than one file has been erased, several
-## processes can execute this block.  We have to make sure that only
-## the first one will run "$(MAKE) $(AM_MAKEFLAGS) elc-stamp", and the
-## other ones will wait.
-##
-## There is a race here if only one child of make receive a signal.
-## In that case the build may fail.  We remove elc-stamp when we receive
-## a signal so we are sure the build will succeed the next time.
-         $$dry trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
-         if $$dry mkdir elc-lock 2>/dev/null; then \
-## This code is being executed by the first process.
-           $$dry rm -f elc-stamp; \
-           $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
-           $$dry rmdir elc-lock; \
-         else \
-## This code is being executed by the follower processes.
-## Wait until the first process is done.
-           while test -d elc-lock && test -z "$$dry"; do sleep 1; done; \
-## Succeed if and only if the first process succeeded.
-           $$dry test -f elc-stamp; exit $$?; \
-         fi; \
-       else : ; fi
+.el.elc:
+## We add $(builddir) and $(srcdir) to load-path, so that any '.el' files
+## that $< depends upon can be found (including generated ones).
+## We prefer files from the build directory to those from the source
+## directory, in true VPATH spirit.
+## The destination file is normally determined by appending "c" to the
+## input (which would erronously put it in $(srcdir) in VPATH builds),
+## so we override that, too.
+       if test "$(EMACS)" != "no"; then \
+         am__subdir_includes=''; \
+         case $@ in */*) \
+           am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
+           am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
+         esac; \
+## Emacs byte-compilation won't create this automatically, sadly.
+         test -d $$am__dir || $(MKDIR_P) $$am__dir || exit 1; \
+         $(EMACS) --batch \
+           $(AM_ELCFLAGS) $(ELCFLAGS) \
+           $$am__subdir_includes -L $(builddir) -L $(srcdir) \
+           --eval "(defun byte-compile-dest-file (f) \"address@hidden")" \
+           --eval "(unless (byte-compile-file \"$<\") (kill-emacs 1))"; \
+       else :; fi
 
 
 ## ------------ ##
@@ -144,7 +112,7 @@ endif %?INSTALL%
 
 .PHONY clean-am: clean-lisp
 clean-lisp:
-       -rm -f elc-stamp $(ELCFILES)
+       -rm -f $(ELCFILES)
 
 
 ## -------------- ##
diff --git a/lib/elisp-comp b/lib/elisp-comp
deleted file mode 100755
index 5e888bd..0000000
--- a/lib/elisp-comp
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/sh
-# Copyright (C) 1995-2012 Free Software Foundation, Inc.
-
-scriptversion=2012-07-05.17; # UTC
-
-# Franc,ois Pinard <address@hidden>, 1995.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <address@hidden> or send patches to
-# <address@hidden>.
-
-case $1 in
-  '')
-     echo "$0: No files.  Try '$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
-  -h | --h*)
-    cat <<\EOF
-Usage: elisp-comp [--help] [--version] FILES...
-
-This script byte-compiles all '.el' files listed as FILES using GNU
-Emacs, and put the resulting '.elc' files into the current directory,
-so disregarding the original directories used in '.el' arguments.
-
-This script manages in such a way that all Emacs LISP files to
-be compiled are made visible between themselves, in the event
-they require or load-library one another.
-
-Report bugs to <address@hidden>.
-EOF
-    exit $?
-    ;;
-  -v | --v*)
-    echo "elisp-comp $scriptversion"
-    exit $?
-    ;;
-esac
-
-if test -z "$EMACS" || test "$EMACS" = "t"; then
-  # Value of "t" means we are running in a shell under Emacs.
-  # Just assume Emacs is called "emacs".
-  EMACS=emacs
-fi
-
-tempdir=elc.$$
-
-# Cleanup the temporary directory on exit.
-trap 'ret=$?; rm -rf "$tempdir" && exit $ret' 0
-do_exit='(exit $ret); exit $ret'
-trap "ret=129; $do_exit" 1
-trap "ret=130; $do_exit" 2
-trap "ret=141; $do_exit" 13
-trap "ret=143; $do_exit" 15
-
-mkdir $tempdir
-cp "$@" $tempdir
-
-(
-  cd $tempdir
-  echo "(setq load-path (cons nil (cons \"$abs_srcdir\" load-path)))" > script
-  $EMACS -batch -q -l script -f batch-byte-compile *.el || exit $?
-  mv *.elc ..
-) || exit $?
-
-(exit 0); exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/t/add-missing.tap b/t/add-missing.tap
index c47382b..f15657a 100755
--- a/t/add-missing.tap
+++ b/t/add-missing.tap
@@ -343,17 +343,6 @@ rm -f foo.texi
 
 check_ <<'END'
 == Name ==
-elisp-comp
-== Files ==
-elisp-comp
-== configure.ac ==
-AM_PATH_LISPDIR
-== Makefile.am ==
-lisp_LISP = foo.el
-END
-
-check_ <<'END'
-== Name ==
 py-compile
 == Files ==
 py-compile
diff --git a/t/dist-auxdir-many-subdirs.sh b/t/dist-auxdir-many-subdirs.sh
index d509836..4937a14 100755
--- a/t/dist-auxdir-many-subdirs.sh
+++ b/t/dist-auxdir-many-subdirs.sh
@@ -56,8 +56,6 @@ END
     foo_SOURCES = foo.c
     ## For py-compile.
     python_PYTHON = bar.py
-    ## For elisp-comp.
-    lisp_LISP = baz.el
     ## For test-driver.
     TESTS =
 END
@@ -67,7 +65,6 @@ END
     missing
     depcomp
     py-compile
-    elisp-comp
     test-driver
   '
 
diff --git a/t/dist-formats.tap b/t/dist-formats.tap
index 85021d3..893aa55 100755
--- a/t/dist-formats.tap
+++ b/t/dist-formats.tap
@@ -93,7 +93,13 @@ have_compressor ()
         # compress stdin.  This would cause binary output in the test
         # logs, with potential breakage of our testsuite harness.
         bzip2) o=--help;;
-            *) o=--version;;
+        # OpenSolaris zip do not support the '--version' option, but
+        # accepts the '-v' one with a similar meaning (if no further
+        # arguments are given).
+        zip) o=-v;;
+        # Assume the other compressors we care about support the
+        # '--version' option.
+        *) o=--version;;
       esac
       # Redirect to stderr to avoid polluting the output, in case this
       # function is used in a command substitution (as it is, below).
diff --git a/t/python7.sh b/t/lisp-flags.sh
similarity index 69%
copy from t/python7.sh
copy to t/lisp-flags.sh
index b3b1421..1d7d8f3 100755
--- a/t/python7.sh
+++ b/t/lisp-flags.sh
@@ -14,25 +14,28 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test detection of missing Python.
-# Same as python6.test, but requiring a version.
+# Elisp byte-compilation honours AM_ELCFLAFS and ELCFLAGS.
 
-# Python is not required for this test.
 . ./defs || exit 1
 
-cat >>configure.ac <<\EOF
-# Hopefully the Python team will never release such a version.
-AM_PATH_PYTHON([9999.9], [], [echo "$PYTHON" > py])
-AC_OUTPUT
+cat > Makefile.am << 'EOF'
+lisp_LISP = foo.el
+AM_ELCFLAGS = __am_elcflags__
 EOF
 
-: > Makefile.am
+cat >> configure.ac << 'EOF'
+AM_PATH_LISPDIR
+AC_OUTPUT
+EOF
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-./configure
-test x"$(cat py)" = x:
+./configure EMACS='echo >$@' --with-lispdir="$(pwd)/unused"
+
+: > foo.el
+ELCFLAGS='__usr_elcflags__' $MAKE -e
+grep '__am_elcflags__.*__usr_elcflags__' foo.elc
 
 :
diff --git a/t/lisp-pr11806.sh b/t/lisp-loadpath.sh
similarity index 61%
copy from t/lisp-pr11806.sh
copy to t/lisp-loadpath.sh
index c372ea5..50748ce 100755
--- a/t/lisp-pr11806.sh
+++ b/t/lisp-loadpath.sh
@@ -14,8 +14,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Compiling .el files that requires each other in a VPATH build.
-# See automake bug#11806.
+# Emacs lisp files in both $(srcdir) and $(builddir) are found if
+# required by other files.  Related to automake bug#11806.
 
 required=emacs
 . ./defs || exit 1
@@ -26,11 +26,13 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+noinst_LISP = requirer.el
 lisp_LISP = foo.el
 lisp_DATA = bar.el
 END
 
-echo "(require 'bar)" > foo.el
+echo "(require 'foo) (require 'bar)" >> requirer.el
+echo "(provide 'foo)" > foo.el
 echo "(provide 'bar)" > bar.el
 
 $ACLOCAL
@@ -41,11 +43,25 @@ mkdir build
 cd build
 ../configure
 $MAKE
+test -f requirer.elc
 test -f foo.elc
-cd ..
+test ! -e bar.elc
 
-./configure
+$MAKE clean
+test ! -e requirer.elc
+test ! -e foo.elc
+
+# In the spirit of VPATH, stuff in the builddir is preferred to
+# stuff in the srcdir.
+echo "(provide" > ../foo.el  # Break it.
+echo "defun)" > ../bar.el    # Likewise.
+$MAKE && Exit 1
+$sleep
+echo "(provide 'foo)" > foo.el
+echo "(provide 'bar)" > bar.el
 $MAKE
+test -f requirer.elc
 test -f foo.elc
+test ! -e bar.elc
 
 :
diff --git a/t/lisp-subdir-mix.sh b/t/lisp-subdir-mix.sh
new file mode 100755
index 0000000..20073ec
--- /dev/null
+++ b/t/lisp-subdir-mix.sh
@@ -0,0 +1,96 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check compiling elisp files in different subdirectories, where a
+# file in a subdirectory might require a file in another one.
+# This doesn't work out of the box, but can be made to work with a
+# judicious use of $(AM_ELCFLAGS).
+
+required=emacs
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+dist_lisp_LISP = \
+  am-here.el \
+  sub1/am-one.el \
+  sub2/am-two.el \
+  sub3/subsub/am-three.el
+
+AM_ELCFLAGS = \
+  -L $(srcdir)/sub1 \
+  -L $(srcdir)/sub2 \
+  -L $(srcdir)/sub3/subsub
+
+elc-test:
+       test -f sub1/am-one.elc
+       test -f sub2/am-two.elc
+       test -f sub3/subsub/am-three.elc
+.PHONY: elc-test
+check-local: elc-test
+END
+
+mkdir sub1 sub2 sub3 sub3/subsub
+
+cat > am-here.el << 'END'
+(provide 'am-here)
+(require 'am-one)
+(require 'am-two)
+(require 'am-three)
+END
+
+cat > sub1/am-one.el << 'END'
+(require 'am-here)
+(provide 'am-one)
+(require 'am-two)
+(require 'am-three)
+END
+
+cat > sub2/am-two.el << 'END'
+(require 'am-here)
+(require 'am-one)
+(provide 'am-two)
+(require 'am-three)
+END
+
+cat > sub3/subsub/am-three.el << 'END'
+(require 'am-here)
+(require 'am-one)
+(require 'am-two)
+(provide 'am-three)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE
+$MAKE elc-test
+$MAKE clean
+for x in am-here sub1/am-one sub2/am-two sub3/subsub/am-three; do
+  test -f $x.el
+  test ! -e $x.elc
+done
+
+$MAKE distcheck
+
+:
diff --git a/t/lisp-subdir.sh b/t/lisp-subdir.sh
new file mode 100755
index 0000000..5c67c53
--- /dev/null
+++ b/t/lisp-subdir.sh
@@ -0,0 +1,80 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Emacs lisp files in subdirectories.
+
+required=emacs
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+nobase_lisp_LISP = sub/am-one.el sub/am-two.el sub/am-three.el
+nobase_dist_lisp_LISP = sub/am-three.el
+dist_noinst_LISP = sub/am-four.el
+EXTRA_DIST = sub/am-one.el sub/am-two.el
+END
+
+mkdir sub
+echo "(require 'am-two) (provide 'am-one)"      > sub/am-one.el
+echo "(require 'am-three) (provide 'am-two)"    > sub/am-two.el
+echo "(provide 'am-three)"                      > sub/am-three.el
+echo "(require 'am-one) (require 'am-two)"      > sub/am-four.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure --prefix="$(pwd)/inst" \
+            --with-lispdir="$(pwd)/inst/elisp" \
+
+$MAKE
+# No byte-compiled elisp files in the top-level directory.
+test "$(echo *.elc)" = '*.elc'
+test -f sub/am-one.elc
+test -f sub/am-two.elc
+test -f sub/am-three.elc
+test -f sub/am-four.elc
+$MAKE clean
+test ! -e sub/am-one.elc
+test ! -e sub/am-two.elc
+test ! -e sub/am-three.elc
+test ! -e sub/am-four.elc
+
+# Check installation.
+
+sort > exp << 'END'
+inst/elisp/sub/am-one.elc
+inst/elisp/sub/am-two.elc
+inst/elisp/sub/am-three.elc
+END
+
+$MAKE install
+find inst # For debugging.
+find inst -name '*.elc' > lst || { cat lst; exit 1; }
+sort lst > got
+
+cat exp
+cat got
+diff exp got
+
+# Also check VPATH builds and uninstall completeness.
+$MAKE distcheck
+
+:
diff --git a/t/lisp-subdir2.sh b/t/lisp-subdir2.sh
new file mode 100755
index 0000000..d7517ad
--- /dev/null
+++ b/t/lisp-subdir2.sh
@@ -0,0 +1,78 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Compiling elisp files in different subdirectories.
+
+required=emacs
+. ./defs || exit 1
+
+cat >> configure.ac << 'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+dist_lisp_LISP = am-one.el
+nodist_lisp_LISP = sub/am-two.el
+sub/am-two.el:
+       mkdir sub
+       echo "(provide 'am-two)" > $@
+DISTCLEANFILES = $(nodist_lisp_LISP)
+dist_noinst_LISP = x/y/z/am-three.el
+
+elc-test:
+       test -f am-one.elc
+       test -f sub/am-two.elc
+       test -f x/y/z/am-three.elc
+.PHONY: elc-test
+check-local: elc-test
+END
+
+mkdir x x/y x/y/z
+echo "(provide 'am-one)" > am-one.el
+# sub/am-two.el is generated at make runtime
+echo "(provide 'am-three)" > x/y/z/am-three.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE
+$MAKE elc-test
+$MAKE clean
+test ! -e am-one.elc
+test ! -e sub/am-two.elc
+test ! -e x/y/z/am-three.elc
+test -f am-one.el
+test -f sub/am-two.el
+test -f x/y/z/am-three.el
+
+# Byte-compiling only a subset of the elisp files.
+$MAKE am-one.elc sub/am-two.elc 
+test -f am-one.elc
+test -f sub/am-two.elc
+test ! -e x/y/z/am-three.elc
+rm -f am-one.elc sub/am-two.elc
+$MAKE x/y/z/am-three.elc
+test ! -e am-one.elc
+test ! -e sub/am-two.elc
+test -f x/y/z/am-three.elc
+
+$MAKE distcheck
+
+:
diff --git a/t/lisp3.sh b/t/lisp3.sh
index 5b95715..a752151 100755
--- a/t/lisp3.sh
+++ b/t/lisp3.sh
@@ -47,7 +47,6 @@ $MAKE
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 # Make sure we can recover from a deletion.
 rm -f am-one.elc
@@ -79,15 +78,6 @@ test -f _inst/$dir/site-lisp/am-three.elc
 $MAKE uninstall
 find _inst | $EGREP '\.elc?$' && exit 1
 
-# Make sure we build all files when any of them change.
-# (We grep a message to make sure the compilation happens.)
-unique=0a3346e2af8a689b85002b53df09142a
-$sleep
-echo "(message \"$unique\")(provide 'am-three)" > am-three.el
-$MAKE >output 2>&1 || { cat output; exit 1; }
-cat output
-grep $unique output
-
 # It should also work for VPATH-builds.
 $MAKE distcheck
 
diff --git a/t/lisp4.sh b/t/lisp4.sh
index b8cb796..41dc873 100755
--- a/t/lisp4.sh
+++ b/t/lisp4.sh
@@ -32,7 +32,6 @@ test:
        test ! -f am-one.elc
        test ! -f am-two.elc
        test ! -f am-three.elc
-       test ! -f elc-stamp
 
 install-test: install
        test -f "$(lispdir)/am-one.el"
diff --git a/t/lisp5.sh b/t/lisp5.sh
index 4d0499c..c154e3c 100755
--- a/t/lisp5.sh
+++ b/t/lisp5.sh
@@ -31,7 +31,6 @@ test:
        test ! -f am-one.elc
        test ! -f am-two.elc
        test ! -f am-three.elc
-       test ! -f elc-stamp
 
 install-test: install
        test -f "$(lispdir)/am-one.el"
diff --git a/t/lisp6.sh b/t/lisp6.sh
index e877d5a..c84917c 100755
--- a/t/lisp6.sh
+++ b/t/lisp6.sh
@@ -57,7 +57,6 @@ $MAKE
 test -f am-one.elc
 test ! -e am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 $MAKE install
 test -f lisp/am-one.el
@@ -73,7 +72,6 @@ $MAKE distclean
 test ! -e am-one.elc
 test ! -e am-two.elc
 test ! -e am-three.elc
-test ! -e elc-stamp
 
 ./configure --with-lispdir="$cwd/lisp" want_two=1
 
@@ -81,7 +79,6 @@ $MAKE
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 # Let's mutilate the source tree, to check the recover rule.
 rm -f am-*.elc
@@ -89,7 +86,6 @@ $MAKE
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 $MAKE install
 test -f lisp/am-one.el
@@ -105,6 +101,5 @@ $MAKE distclean
 test ! -e am-one.elc
 test ! -e am-two.elc
 test ! -e am-three.elc
-test ! -e elc-stamp
 
 :
diff --git a/t/lisp7.sh b/t/lisp7.sh
index 4553298..7efa27f 100755
--- a/t/lisp7.sh
+++ b/t/lisp7.sh
@@ -39,12 +39,10 @@ $AUTOMAKE --add-missing
 
 $MAKE >stdout || { cat stdout; exit 1; }
 cat stdout
-test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
 
 test ! -e am-one.elc
 test ! -e am-two.elc
 test ! -e am-three.elc
-test -f elc-stamp
 
 $MAKE distcheck
 
diff --git a/t/lisp8.sh b/t/lisp8.sh
index 6e6b901..7464c68 100755
--- a/t/lisp8.sh
+++ b/t/lisp8.sh
@@ -42,12 +42,10 @@ $AUTOMAKE --add-missing
 $MAKE -j >>stdout || { cat stdout; exit 1; }
 
 cat stdout
-test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
 
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 rm -f am-*.elc
 
@@ -56,10 +54,8 @@ rm -f am-*.elc
 $MAKE -j >>stdout || { cat stdout; exit 1; }
 
 cat stdout
-test 1 -eq $(grep -c 'Warnings can be ignored' stdout)
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
 :
diff --git a/t/lispdry.sh b/t/lispdry.sh
index f7de071..765942d 100755
--- a/t/lispdry.sh
+++ b/t/lispdry.sh
@@ -42,9 +42,8 @@ $MAKE
 test -f am-one.elc
 test -f am-two.elc
 test -f am-three.elc
-test -f elc-stamp
 
-rm -f am-*.elc elc-stamp
+rm -f am-*.elc
 
 chmod a-w .
 
@@ -53,6 +52,5 @@ $MAKE -n
 test ! -e am-one.elc
 test ! -e am-two.elc
 test ! -e am-three.elc
-test ! -e elc-stamp
 
 :
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 6f1eeab..3125cf4 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -627,8 +627,13 @@ t/lisp5.sh \
 t/lisp6.sh \
 t/lisp7.sh \
 t/lisp8.sh \
+t/lisp-loadpath.sh \
+t/lisp-subdir.sh \
+t/lisp-subdir2.sh \
+t/lisp-subdir-mix.sh \
 t/lispdry.sh \
 t/lisp-pr11806.sh \
+t/lisp-flags.sh \
 t/listval.sh \
 t/location.sh \
 t/longline.sh \
diff --git a/t/primary-prefix-invalid-couples.tap 
b/t/primary-prefix-invalid-couples.tap
index dadf38d..86d7665 100755
--- a/t/primary-prefix-invalid-couples.tap
+++ b/t/primary-prefix-invalid-couples.tap
@@ -29,7 +29,6 @@ oIFS=$IFS # Saved for later.
 : > ar-lib
 : > ltmain.sh
 : > texinfo.tex
-: > elisp-comp
 : > py-compile
 : > config.guess
 : > config.sub
diff --git a/t/primary-prefix-valid-couples.sh 
b/t/primary-prefix-valid-couples.sh
index 778d1a1..1890369 100755
--- a/t/primary-prefix-valid-couples.sh
+++ b/t/primary-prefix-valid-couples.sh
@@ -41,7 +41,6 @@ END
 echo '@setfilename foo' > foo.texi
 : > texinfo.tex
 : > py-compile
-: > elisp-comp
 : > ar-lib
 
 # Setup Makefile.am.


hooks/post-receive
-- 
GNU Automake



reply via email to

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