]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Support for conditional _LISP.
authorAlexandre Duret-Lutz <adl@gnu.org>
Sun, 1 Feb 2004 12:54:02 +0000 (12:54 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Sun, 1 Feb 2004 12:54:02 +0000 (12:54 +0000)
* 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.

ChangeLog
NEWS
automake.in
lib/am/lisp.am
tests/Makefile.am
tests/Makefile.in
tests/lisp6.test [new file with mode: 0755]

index fa0676d2f60987fab8773e9e7cdfbbdd293ef556..c6890dbd47fc279fd546cab6e327b11393eaa8ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 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.
diff --git a/NEWS b/NEWS
index 50f38c97ddd28c4c7514eaad680ea9e6dd69b9ec..e90e9a44d21e7641b1b5f2ae2f0ab529f849ee9a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,13 +17,7 @@ New in 1.8a:
     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:
index c383d69c5cb9f2bcf4d254e363076ad58d754200..f22cffc88245f7708e2b17bd428de981a4f5407d 100755 (executable)
@@ -4333,7 +4333,7 @@ sub handle_emacs_lisp
   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)';
 
index a9232a8a2ee0ac7af287726ff392f8de815a9bf0..840df01cbb63777231ed7669b519374ed276c130 100644 (file)
@@ -25,7 +25,7 @@ endif %?INSTALL%
 ## 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 \
@@ -33,7 +33,7 @@ elc-stamp: $(am__ELFILES)
          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; \
index 3c86a6b620fab109d7a5c5f62b17e2e087f398ac..91f017462500c5403d2e3f723142d25de3727270 100644 (file)
@@ -292,6 +292,7 @@ lisp2.test \
 lisp3.test \
 lisp4.test \
 lisp5.test \
+lisp6.test \
 listval.test \
 location.test \
 ltcond.test \
index ad56ddd11a6816eebb516664d0c6946178ba632c..75145f4582af7d4c5b06c4b306b2a6d094c78764 100644 (file)
@@ -65,6 +65,7 @@ ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 FGREP = @FGREP@
+GREP = @GREP@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -406,6 +407,7 @@ lisp2.test \
 lisp3.test \
 lisp4.test \
 lisp5.test \
+lisp6.test \
 listval.test \
 location.test \
 ltcond.test \
diff --git a/tests/lisp6.test b/tests/lisp6.test
new file mode 100755 (executable)
index 0000000..0b415a6
--- /dev/null
@@ -0,0 +1,100 @@
+#! /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