[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/7] elisp: support elisp files in subdirectories properly
From: |
Stefano Lattarini |
Subject: |
[PATCH 7/7] elisp: support elisp files in subdirectories properly |
Date: |
Sat, 14 Jul 2012 23:52:01 +0200 |
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>
---
lib/am/lisp.am | 9 ++++++++-
t/list-of-tests.mk | 2 --
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index 59c9fa9..543a12c 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -31,8 +31,15 @@ endif %?INSTALL%
## 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) -q --batch \
- -L '$(builddir)' -L '$(srcdir)' \
+ $$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
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index c7d0fad..c0a7572 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -38,8 +38,6 @@ t/override-conditional-2.sh \
t/dist-pr109765.sh \
t/instdir-cond2.sh \
t/java-nobase.sh \
-t/lisp-subdir.sh \
-t/lisp-subdir2.sh \
t/objext-pr10128.sh \
t/parallel-tests-many.sh \
t/pr8365-remake-timing.sh \
--
1.7.9.5
- Refactoring elisp compilation, Jack Kelly, 2012/07/14
- Re: Refactoring elisp compilation, Stefano Lattarini, 2012/07/14
- [PATCH 0/7] More work on elisp support, Stefano Lattarini, 2012/07/14
- [PATCH 1/7] coverage: emacs lisp files in subdirectories, Stefano Lattarini, 2012/07/14
- [PATCH 2/7] coverage: elisp path contains $(srcdir) and $(builddir), Stefano Lattarini, 2012/07/14
- [PATCH 3/7] elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite), Stefano Lattarini, 2012/07/14
- [PATCH 4/7] elisp: prefer $(builddir) files over $(srcdir) ones, Stefano Lattarini, 2012/07/14
- [PATCH 5/7] elisp: no need to "absolutize" $(srcdir) and $(builddir) ..., Stefano Lattarini, 2012/07/14
- Re: [PATCH 5/7] elisp: no need to "absolutize" $(srcdir) and $(builddir) ..., Jack Kelly, 2012/07/14
- Re: [PATCH 5/7] elisp: no need to "absolutize" $(srcdir) and $(builddir) ..., Stefano Lattarini, 2012/07/15
- [PATCH 7/7] elisp: support elisp files in subdirectories properly,
Stefano Lattarini <=
- [PATCH 6/7] elisp: simplify suffix rules using emacs '-L' option, Stefano Lattarini, 2012/07/14
- Re: Refactoring elisp compilation, Jack Kelly, 2012/07/14
- Re: Refactoring elisp compilation, Stefano Lattarini, 2012/07/15
- Re: Refactoring elisp compilation, Jack Kelly, 2012/07/17
- Re: Refactoring elisp compilation, Stefano Lattarini, 2012/07/17
- Re: Refactoring elisp compilation, Jack Kelly, 2012/07/23
- Re: Refactoring elisp compilation, Stefano Lattarini, 2012/07/23
- Re: Refactoring elisp compilation, Jack Kelly, 2012/07/23
- Re: Refactoring elisp compilation, Stefano Lattarini, 2012/07/23