[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: support for conditional _LISP
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: support for conditional _LISP |
Date: |
Sun, 01 Feb 2004 13:53:46 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) |
I'm installing this on HEAD.
2004-02-01 Alexandre Duret-Lutz <address@hidden>
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.
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.262
diff -u -r1.262 NEWS
--- NEWS 10 Jan 2004 00:24:28 -0000 1.262
+++ NEWS 1 Feb 2004 12:51:07 -0000
@@ -17,13 +17,7 @@
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.
New in 1.8:
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1542
diff -u -r1.1542 automake.in
--- automake.in 1 Feb 2004 12:18:02 -0000 1.1542
+++ automake.in 1 Feb 2004 12:51:11 -0000
@@ -4333,7 +4333,7 @@
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: lib/am/lisp.am
===================================================================
RCS file: /cvs/automake/automake/lib/am/lisp.am,v
retrieving revision 1.43
diff -u -r1.43 lisp.am
--- lib/am/lisp.am 1 Feb 2004 12:18:02 -0000 1.43
+++ lib/am/lisp.am 1 Feb 2004 12:51:13 -0000
@@ -25,7 +25,7 @@
## 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 @@
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: tests/Makefile.am
===================================================================
RCS file: /cvs/automake/automake/tests/Makefile.am,v
retrieving revision 1.546
diff -u -r1.546 Makefile.am
--- tests/Makefile.am 31 Jan 2004 14:34:42 -0000 1.546
+++ tests/Makefile.am 1 Feb 2004 12:51:13 -0000
@@ -292,6 +292,7 @@
lisp3.test \
lisp4.test \
lisp5.test \
+lisp6.test \
listval.test \
location.test \
ltcond.test \
Index: tests/lisp6.test
===================================================================
RCS file: tests/lisp6.test
diff -N tests/lisp6.test
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tests/lisp6.test 1 Feb 2004 12:51:14 -0000
@@ -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
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: support for conditional _LISP,
Alexandre Duret-Lutz <=