2004-02-01 Alexandre Duret-Lutz <adl@gnu.org>
+ * automake.in (handle_emacs_lisp): Define $(ELCFILES) as
+ $(am__ELCFILES), and always push it on @all. Do not mention
+ elc-stamp.
+ * lib/am/lisp.am (.el.elc): Rewrite as ...
+ ($(am__ELCFILES)): ... this, and depend on elc-stamp.
+ (elc-stamp): Make sure elc-stamp is older that all .elc files, as
+ explained in the manual entry below.
+
* doc/automake.texi (multiple outputs): New node.
2004-01-31 Alexandre Duret-Lutz <adl@gnu.org>
return if ! @elfiles;
- # Generate .elc files.
- my @elcfiles = map { $_->[1] . 'c' } @elfiles;
-
- define_pretty_variable ('ELCFILES', TRUE, INTERNAL, @elcfiles);
define_pretty_variable ('am__ELFILES', TRUE, INTERNAL,
map { $_->[1] } @elfiles);
+ define_pretty_variable ('am__ELCFILES', TRUE, INTERNAL,
+ '$(am__ELFILES:.el=.elc)');
+ # This one can be overridden by users.
+ define_pretty_variable ('ELCFILES', TRUE, INTERNAL, '$(am__ELCFILES)');
- # Do not depend on the build rules if ELCFILES is empty.
- # This is necessary because overriding ELCFILES= is a documented
- # idiom to disable byte-compilation.
- if (variable_value ('ELCFILES'))
- {
- # It's important that all depends on elc-stamp so that
- # all .elc files get recompiled whenever a .el changes.
- # It's important that all depends on $(ELCFILES) so that
- # we can recover if any of them is deleted.
- push (@all, 'elc-stamp', '$(ELCFILES)');
- }
+ push @all, '$(ELCFILES)';
require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE,
'EMACS', 'lispdir');
elc-stamp: $(am__ELFILES)
@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; \
shift; \
EMACS="$(EMACS)" $(SHELL) $(elisp_comp) "$$@" || exit 1; \
else : ; fi
- touch $@
+ @mv -f elc-temp $@
-.el.elc:
+## 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 $@
@if test ! -f $@; then \
rm -f elc-stamp; \
$(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
else : ; fi
+
## ------------ ##
## Installing. ##
## ------------ ##