From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Paul Smith Newsgroups: gmane.emacs.bugs Subject: bug#37632: [PATCH] Support GNU make error messages in compile mode. Date: Sat, 5 Oct 2019 09:38:11 -0400 Message-ID: <20191005133811.12302-1-psmith@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="153548"; mail-complaints-to="usenet@blaine.gmane.org" To: 37632@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 05 15:39:12 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iGkH9-000dlk-Ge for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Oct 2019 15:39:11 +0200 Original-Received: from localhost ([::1]:56794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGkH7-0006GO-Oj for geb-bug-gnu-emacs@m.gmane.org; Sat, 05 Oct 2019 09:39:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59918) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGkH1-0006GH-6I for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 09:39:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGkH0-0004Yn-4Y for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 09:39:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35113) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iGkH0-0004Yh-2F for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 09:39:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iGkGz-0004PK-TD for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 09:39:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Oct 2019 13:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37632 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157028271816907 (code B ref -1); Sat, 05 Oct 2019 13:39:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Oct 2019 13:38:38 +0000 Original-Received: from localhost ([127.0.0.1]:43934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGkGb-0004Od-Pw for submit@debbugs.gnu.org; Sat, 05 Oct 2019 09:38:38 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48359) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iGkGZ-0004OU-Ha for submit@debbugs.gnu.org; Sat, 05 Oct 2019 09:38:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59891) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGkGY-0006Eo-6A for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 09:38:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iGkGY-0004Sg-38 for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 09:38:34 -0400 Original-Received: from pool-98-118-0-140.bstnma.fios.verizon.net ([98.118.0.140]:59732 helo=homebase.bo2.nuodb.com) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iGkGX-0000WC-NO for bug-gnu-emacs@gnu.org; Sat, 05 Oct 2019 09:38:33 -0400 X-Mailer: git-send-email 2.18.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:168374 Archived-At: * 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 | 6 ++++++ test/lisp/progmodes/compile-tests.el | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 83efb3e029..50370a4f3a 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -274,6 +274,12 @@ compilation-error-regexp-alist-alist (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 diff --git a/test/lisp/progmodes/compile-tests.el b/test/lisp/progmodes/compile-tests.el index 8e59a5401b..08a369e7b5 100644 --- a/test/lisp/progmodes/compile-tests.el +++ b/test/lisp/progmodes/compile-tests.el @@ -180,6 +180,12 @@ compile-tests--test-regexps-data 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 @@ compile-test-error-regexps (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. -- 2.18.0