From 7a0be38a8c9b0b49c29a04037bec27ac4a26b25c Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 16 Mar 2005 00:10:28 +0000 Subject: [PATCH] * 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. --- ChangeLog | 9 ++++++++ lib/am/lisp.am | 10 ++++++--- tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/lisp7.test | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 74 insertions(+), 3 deletions(-) create mode 100755 tests/lisp7.test diff --git a/ChangeLog b/ChangeLog index bad8f803..3778769d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-03-16 Alexandre Duret-Lutz + + * 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 * doc/automake.texi: Replace wicked whiches by thats. diff --git a/lib/am/lisp.am b/lib/am/lisp.am index 840df01c..15b8bfe9 100644 --- a/lib/am/lisp.am +++ b/lib/am/lisp.am @@ -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 diff --git a/tests/Makefile.am b/tests/Makefile.am index 25c11ec2..af4ac597 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -320,6 +320,7 @@ lisp3.test \ lisp4.test \ lisp5.test \ lisp6.test \ +lisp7.test \ listval.test \ location.test \ longline.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index d9224a9a..8e30dcee 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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 index 00000000..ff672267 --- /dev/null +++ b/tests/lisp7.test @@ -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 -- 2.43.5