* lib/am/lisp.am ($(am__ELCFILES)): Do not attempt to recover
authorAlexandre Duret-Lutz <adl@gnu.org>
Wed, 16 Mar 2005 00:10:32 +0000 (00:10 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Wed, 16 Mar 2005 00:10:32 +0000 (00:10 +0000)
a missing *.elc file if it cannot be created because emacs does
not exist.
* tests/lisp7.test: New file.
* tests/Makefile.am (TESTS): Add lisp7.test.
Report from Greg Schafer.

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

index bad8f80..3778769 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-03-16  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * lib/am/lisp.am ($(am__ELCFILES)): Do not attempt to recover
+       a missing *.elc file if it cannot be created because emacs does
+       not exist.
+       * tests/lisp7.test: New file.
+       * tests/Makefile.am (TESTS): Add lisp7.test.
+       Report from Greg Schafer.
+
 2005-03-05  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * doc/automake.texi: Replace wicked whiches by thats.
index 840df01..15b8bfe 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -47,8 +47,12 @@ elc-stamp: $(LISP)
 ## 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 \
+## Recover from the removal of $@.
+##
+## Make sure not to call `make elc-stamp' if emacs is not available,
+## because as all *.elc files appear as missing, a parallel make would
+## attempt to build elc-stamp several times.
+       @if test "$(EMACS)" != no && test ! -f $@; then \
          rm -f elc-stamp; \
          $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
        else : ; fi
index 25c11ec..af4ac59 100644 (file)
@@ -320,6 +320,7 @@ lisp3.test \
 lisp4.test \
 lisp5.test \
 lisp6.test \
+lisp7.test \
 listval.test \
 location.test \
 longline.test \
index d9224a9..8e30dce 100644 (file)
@@ -440,6 +440,7 @@ lisp3.test \
 lisp4.test \
 lisp5.test \
 lisp6.test \
+lisp7.test \
 listval.test \
 location.test \
 longline.test \
diff --git a/tests/lisp7.test b/tests/lisp7.test
new file mode 100755 (executable)
index 0000000..ff67226
--- /dev/null
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2005  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.
+
+# Make sure that lisp_LISP also works when emacs is not installed.
+
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'EOF'
+dist_lisp_LISP = am-one.el am-two.el am-three.el
+EOF
+
+cat >> configure.in << 'EOF'
+AM_PATH_LISPDIR
+EMACS=no # Simulate no emacs.
+AC_OUTPUT
+EOF
+
+echo "(require 'am-two)" > am-one.el
+echo "(require 'am-three) (provide 'am-two)" > am-two.el
+echo "(provide 'am-three)" > am-three.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+./configure
+
+$MAKE >stdout
+
+cat stdout
+test 1 -eq `grep 'Warnings can be ignored' stdout | wc -l`
+
+test ! -f am-one.elc
+test ! -f am-two.elc
+test ! -f am-three.elc
+test -f elc-stamp
+
+$MAKE distcheck