Subject: bug#7441: 1.11.1: Emacs files in subdirs

From: Akim Demaille <[email-masked]>
Date: Fri, 19 Nov 2010 10:14:31 +0100

Hi all,

When passing _LISP files with a path, Automake produces schizophrenic Makefiles that expects the elc files to have the same path too, but produces elc files in `.'.

---- Makefile.am

dist_lisp_LISP = build-aux/rebox.el build-aux/tiger.el build-aux/leopard.el

---- Makefile.in

LISP = $(dist_lisp_LISP)
am__ELFILES = build-aux/leopard.el build-aux/rebox.el \
	build-aux/tiger.el
am__ELCFILES = $(am__ELFILES:.el=.elc)
ELCFILES = $(LISP:.el=.elc)

...

elc-stamp: $(LISP)
	@echo 'WARNING: Warnings can be ignored. :-)'
	@rm -f elc-temp && touch elc-temp
	if test "$(EMACS)" != no; then \
	  set x; \
	  list='$(LISP)'; for p in $$list; do \
	    if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	    set x "$$@" "$$d$$p"; shift; \
	  done; \
	  shift; \
	  EMACS="$(EMACS)" $(SHELL) $(elisp_comp) "$$@" || exit 1; \
	else : ; fi
	@mv -f elc-temp $@

So basically, it expects that build-aux/rebox.el be compiled into build-aux/rebox.elc (which is also what I expected, à la subdir-objects), but it compiles the files as:

	$(elisp_comp) $(srcdir)/build-aux/rebox.el

and elisp_comp, in that case, produces ./rebox.elc.

So:
1. there are compilations at each make because it can't see the elc files it expects.
2. it fails to install the compiled files
3. it fails to clean them

Thanks!