]> git.eshelyaron.com Git - emacs.git/commitdiff
Support GNU make error messages in compile mode.
authorPaul Smith <psmith@gnu.org>
Sat, 5 Oct 2019 19:29:04 +0000 (12:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 5 Oct 2019 19:33:23 +0000 (12:33 -0700)
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist):
Match GNU make error messages.
* test/lisp/progmodes/compile-tests.el (compile-tests--test-regexps-data):
Test GNU make error message matching.
(compile-test-error-regexps): Update count of infos found.

lisp/progmodes/compile.el
test/lisp/progmodes/compile-tests.el

index 83efb3e029550ebd879829f93634663b06f7de58..50370a4f3acf2387657f8d4c223217c0890ec0e2 100644 (file)
@@ -274,6 +274,12 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
     (ruby-Test::Unit
      "^[\t ]*\\[\\([^(].*\\):\\([1-9][0-9]*\\)\\(\\]\\)?:in " 1 2)
 
+    (gmake
+     ;; Set GNU make error messages as INFO level.
+     ;; It starts with the name of the make program which is variable,
+     ;; so don't try to match it.
+     ": \\*\\*\\* \\[\\(\\(.+?\\):\\([0-9]+\\): .+\\)\\]" 2 3 nil 0 1)
+
     (gnu
      ;; The first line matches the program name for
 
index 8e59a5401bbed93c8b329f3e655616ca431c2601..08a369e7b54b13d6524079feaaeecbf35dd3babe 100644 (file)
      1 0 31 "/usr/include/c++/3.3/backward/iostream.h")
     ("                 from test_clt.cc:1:"
      1 nil 1 "test_clt.cc")
+    ;; gmake
+    ("make: *** [Makefile:20: all] Error 2" 12 nil 20 "Makefile" 0)
+    ("make[4]: *** [sub/make.mk:19: all] Error 127" 15 nil 19 "sub/make.mk" 0)
+    ("gmake[4]: *** [sub/make.mk:19: all] Error 2" 16 nil 19 "sub/make.mk" 0)
+    ("gmake-4.3[4]: *** [make.mk:1119: all] Error 2" 20 nil 1119 "make.mk" 0)
+    ("Make-4.3: *** [make.INC:1119: dir/all] Error 2" 16 nil 1119 "make.INC" 0)
     ;; gnu
     ("foo.c:8: message" 1 nil 8 "foo.c")
     ("../foo.c:8: W: message" 1 nil 8 "../foo.c")
@@ -409,7 +415,7 @@ The test data is in `compile-tests--test-regexps-data'."
       (mapc #'compile--test-error-line compile-tests--test-regexps-data)
       (should (eq compilation-num-errors-found 87))
       (should (eq compilation-num-warnings-found 32))
-      (should (eq compilation-num-infos-found 21)))))
+      (should (eq compilation-num-infos-found 26)))))
 
 (ert-deftest compile-test-grep-regexps ()
   "Test the `grep-regexp-alist' regexps.