From 3645d0ff5e0e4ee1163b97cf2a498246a014a85c Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 14 Jul 2012 23:14:45 +0200 Subject: [PATCH] elisp: support elisp files in subdirectories properly For more reference, see: * 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 --- 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 582d8f3..b18568b 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) \"$@\")" \ --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 \ -- 2.7.4