]> git.eshelyaron.com Git - emacs.git/commitdiff
Make test/Makefile more robust
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 27 Apr 2022 12:13:24 +0000 (14:13 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 27 Apr 2022 12:13:24 +0000 (14:13 +0200)
* test/Makefile.in (test_template): Do not fails if corresponding
source file doesn't exist.

test/Makefile.in

index 3b6e116e65f274ce91686f3a375455fb6bf44d60..9c61da9dde83d1cf8ef11824abeb1899a594a717 100644 (file)
@@ -221,9 +221,9 @@ define test_template
   ## The similar name is FOO.c if FOO begins with '{lib-,}src/', FOO.el
   ## otherwise.  Although this heuristic does not identify all the
   ## dependencies, it is better than nothing.
+  srcfile = $(patsubst %-tests,$(srcdir)/../%,$(1))$(if $(patsubst src/%,,$(patsubst lib-src/%,,$(1))),.el,.c)
   ifeq (,$(patsubst %-tests,,$(1))$(findstring -tests/,$(1)))
-    $(1).log: $(patsubst %-tests,$(srcdir)/../%,$(1))$(if \
-                                       $(patsubst src/%,,$(patsubst lib-src/%,,$(1))),.el,.c)
+    $(1).log: $(srcfile)
     $(notdir $(1).log): $(1).log
   endif