automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, experimental/elisp-work, up


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, experimental/elisp-work, updated. v1.12.2-127-gb9ee5df
Date: Sun, 05 Aug 2012 09:04:56 +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=b9ee5dfe75d1a524cfb0fc925851dcc13cfbfa0b

The branch, experimental/elisp-work has been updated
       via  b9ee5dfe75d1a524cfb0fc925851dcc13cfbfa0b (commit)
       via  48e99a7ee6b2ef12bb5d7861f5b71ccd6f69c6e9 (commit)
       via  56cd2dda0edcc4089954fd560712d762b80cebe5 (commit)
      from  1ee9c78b296198bcec16bd9a9f01511ded9780e0 (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 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>

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

Summary of changes:
 NEWS                            |   24 ++++++++++
 doc/automake.texi               |    5 ++-
 lib/am/lisp.am                  |    1 +
 t/{python7.sh => lisp-flags.sh} |   23 +++++----
 t/lisp-subdir-mix.sh            |   96 +++++++++++++++++++++++++++++++++++++++
 t/list-of-tests.mk              |    2 +
 6 files changed, 140 insertions(+), 11 deletions(-)
 copy t/{python7.sh => lisp-flags.sh} (69%)
 create mode 100755 t/lisp-subdir-mix.sh

diff --git a/NEWS b/NEWS
index d2fc46d..5884e78 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/doc/automake.texi b/doc/automake.texi
index a34b401..d2bc574 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -7469,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 36b1243..fc3575b 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -39,6 +39,7 @@ endif %?INSTALL%
 ## 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))"; \
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-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/list-of-tests.mk b/t/list-of-tests.mk
index c0a7572..35197a5 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -633,8 +633,10 @@ 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 \


hooks/post-receive
-- 
GNU Automake



reply via email to

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