2004-02-01 Alexandre Duret-Lutz <adl@gnu.org>
+ Support for conditional _LISP.
+ * automake.in (handle_emacs_lisp): Define $(ELCFILES) from LISP, not
+ from $(am__ELCFILES).
+ * lib/am/lisp.am (elc-stamp): Use $(LISP) instead of $(am__ELFILES).
+ * tests/lisp6.test: New file.
+ * tests/Makefile.am (TESTS): Add it.
+
* automake.in (handle_emacs_lisp): Define $(ELCFILES) as
$(am__ELCFILES), and always push it on @all. Do not mention
elc-stamp.
the two .o and .obj rules for usual objects, or the .lo rule for
libtool objects.
-* Bug fixes.
-
- - Distribute all files, even those which are built and installed
- conditionally. This change affects files listed in conditionally
- defined *_HEADERS and *_PYTHON variable (unless they are nodist_*)
- as well as those listed in conditionally defined dist_*_DATA,
- dist_*_JAVA, dist_*_LISP, and dist_*_SCRIPTS variables.
+* Support for conditional _LISP.
\f
New in 1.8:
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)');
+ define_pretty_variable ('ELCFILES', TRUE, INTERNAL, '$(LISP:.el=.elc)');
push @all, '$(ELCFILES)';
## Building. ##
## ---------- ##
-elc-stamp: $(am__ELFILES)
+elc-stamp: $(LISP)
@echo 'WARNING: Warnings can be ignored. :-)'
@rm -f elc-temp && touch elc-temp
if test "$(EMACS)" != no; then \
set x; \
## Populate "$@" with elisp files (found in the current directory
## or in $srcdir).
- list='$(am__ELFILES)'; for p in $$list; do \
+ list='$(LISP)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
set x "$$@" "$$d$$p"; shift; \
done; \
lisp3.test \
lisp4.test \
lisp5.test \
+lisp6.test \
listval.test \
location.test \
ltcond.test \
ECHO_T = @ECHO_T@
EGREP = @EGREP@
FGREP = @FGREP@
+GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
lisp3.test \
lisp4.test \
lisp5.test \
+lisp6.test \
listval.test \
location.test \
ltcond.test \
--- /dev/null
+#! /bin/sh
+# Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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 GNU Automake; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Test for conditional _LISP.
+
+required=emacs
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'EOF'
+dist_lisp_LISP = am-one.el
+if WANT_TWO
+ dist_lisp_LISP += am-two.el
+endif
+dist_noinst_LISP = am-three.el
+
+dist-test: distdir
+ test -f $(distdir)/am-one.el
+ test -f $(distdir)/am-two.el
+ test -f $(distdir)/am-three.el
+EOF
+
+cat >> configure.in << 'EOF'
+AM_CONDITIONAL([WANT_TWO], test -n "$want_two")
+AM_PATH_LISPDIR
+AC_OUTPUT
+EOF
+
+echo "(provide 'am-one)" > am-one.el
+echo "(require 'am-one)" > am-two.el
+echo "(require 'am-one)" > am-three.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+./configure --with-lispdir=`pwd`/lisp
+
+$MAKE
+test -f am-one.elc
+test ! -f am-two.elc
+test -f am-three.elc
+test -f elc-stamp
+
+$MAKE install
+test -f lisp/am-one.el
+test -f lisp/am-one.elc
+test ! -f lisp/am-two.el
+test ! -f lisp/am-two.elc
+test ! -f lisp/am-three.el
+test ! -f lisp/am-three.elc
+
+$MAKE dist-test
+
+$MAKE distclean
+test ! -f am-one.elc
+test ! -f am-two.elc
+test ! -f am-three.elc
+test ! -f elc-stamp
+
+
+./configure --with-lispdir=`pwd`/lisp want_two=1
+$MAKE
+test -f am-one.elc
+test -f am-two.elc
+test -f am-three.elc
+test -f elc-stamp
+
+$MAKE install
+test -f lisp/am-one.el
+test -f lisp/am-one.elc
+test -f lisp/am-two.el
+test -f lisp/am-two.elc
+test ! -f lisp/am-three.el
+test ! -f lisp/am-three.elc
+
+$MAKE dist-test
+
+$MAKE distclean
+test ! -f am-one.elc
+test ! -f am-two.elc
+test ! -f am-three.elc
+test ! -f elc-stamp