]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
automake: Ensure space after $(LISP) in tags dependencies.
authorKarl Berry <karl@freefriends.org>
Tue, 17 Dec 2019 02:45:22 +0000 (19:45 -0700)
committerJim Meyering <meyering@fb.com>
Wed, 18 Dec 2019 05:48:15 +0000 (21:48 -0800)
This change fixes automake bug#38139.

* bin/automake.in (handle_tags): Concatenate with space in " @config".
* t/tags-lisp-space.sh: New test.
* t/list-of-tests.mk (handwritten_TESTS): Add it.

NEWS
bin/automake.in
t/list-of-tests.mk
t/tags-lisp-space.sh [new file with mode: 0755]

diff --git a/NEWS b/NEWS
index bb3fff83f2ca09520cdc72baf2cba3c019a6b501..9bf332b0678a9608c65ceaa735035d78462e4b37 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -79,6 +79,10 @@ New in ?.?.?:
     compatibility with the 'sed' implementation provided by macOS which
     considers '\n' as the 'n' character instead of a newline.
     (automake bug#31222)
+  
+  - For make tags, lisp_LISP is followed by the necessary space when
+    used with CONFIG_HEADERS.
+    (automake bug#38139)
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
index 67a7a957838338b8865b9a0c8d47598de13ce6c5..2e04bfb9a87a456e68d330114115161e7e8ea2e1 100644 (file)
@@ -3708,7 +3708,7 @@ sub handle_tags ()
 
     define_variable ('am__tagged_files',
                      '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)'
-                     . "@config", INTERNAL);
+                     . " @config", INTERNAL);
 
     if (rvar('am__tagged_files')->value_as_list_recursive
           || var ('ETAGS_ARGS') || var ('SUBDIRS'))
index be3b530775901d7d8ac0dc68ed1685c24e66a1af..445545e8944f6e96edfdb674cb6f91d3f9864085 100644 (file)
@@ -1188,6 +1188,7 @@ t/tap-summary-color.sh \
 t/tags.sh \
 t/tags2.sh \
 t/tagsub.sh \
+t/tags-lisp-space.sh \
 t/tags-pr12372.sh \
 t/tar-ustar.sh \
 t/tar-pax.sh \
diff --git a/t/tags-lisp-space.sh b/t/tags-lisp-space.sh
new file mode 100755 (executable)
index 0000000..256a0f7
--- /dev/null
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (C) 2019 Free Software Foundation, Inc.
+#
+# This program 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.
+#
+# This program 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 this program.  If not, see <https://www.gnu.org/licenses/>.
+
+# Test to ensure the space after $(LISP) for make tags is present
+# if there are CONFIG_HEADERS.
+# See automake bug#38139.
+
+required=''
+. test-init.sh
+
+# some AC_CONFIG_FILES header is needed to trigger the bug.
+cat >> configure.ac <<'END'
+AC_CONFIG_HEADERS([config.h])
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+lisp_LISP = the-amtest-mode.el
+END
+
+touch config.h.in
+touch the-amtest-mode.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+run_make -O -E tags
+
+# make tags should fail if the problem exists, but just in case, match:
+# make: *** No rule to make target 'the-amtest-mode.elconfig.h.in', needed by 'tags-am'.  Stop.
+grep 'No rule to make target' stderr && exit 1
+
+: