840325
From a4b3abc4104d8a4eeb84a6242f2f1a830204a539 Mon Sep 17 00:00:00 2001
840325
From: Christos Zoulas <christos@zoulas.com>
840325
Date: Sat, 12 Mar 2022 15:09:47 +0000
840325
Subject: [PATCH] Combine regex's to improve performance adjusting strength to
840325
 preserve ranking (Dirk Mueller)
840325
840325
---
840325
 magic/Magdir/make | 29 +++++++----------------------
840325
 1 file changed, 7 insertions(+), 22 deletions(-)
840325
840325
diff --git a/magic/Magdir/make b/magic/Magdir/make
840325
index f522b4f18..1abdf7a3e 100644
840325
--- a/magic/Magdir/make
840325
+++ b/magic/Magdir/make
840325
@@ -1,36 +1,21 @@
840325
 #------------------------------------------------------------------------------
840325
-# $File: make,v 1.4 2018/05/29 17:26:02 christos Exp $
840325
+# $File: make,v 1.5 2022/03/12 15:09:47 christos Exp $
840325
 # make:  file(1) magic for makefiles
840325
 #
840325
 # URL: https://en.wikipedia.org/wiki/Make_(software)
840325
-0	regex/100l	\^CFLAGS	makefile script text
840325
-!:mime	text/x-makefile
840325
-0	regex/100l	\^VPATH		makefile script text
840325
-!:mime	text/x-makefile
840325
-0	regex/100l	\^LDFLAGS	makefile script text
840325
-!:mime	text/x-makefile
840325
-0	regex/100l	\^all:		makefile script text
840325
-!:mime	text/x-makefile
840325
-0	regex/100l	\^\\.PRECIOUS	makefile script text
840325
+0	regex/100l	\^(CFLAGS|VPATH|LDFLAGS|all:|\\.PRECIOUS)	makefile script text
840325
 !:mime	text/x-makefile
840325
+!:strength -15
840325
 # Update: Joerg Jenderek
840325
 # Reference: https://www.freebsd.org/cgi/man.cgi?make(1)
840325
 # exclude grub-core\lib\libgcrypt\mpi\Makefile.am with "#BEGIN_ASM_LIST"
840325
 # by additional escaping point character
840325
-0	regex/100l	\^\\.BEGIN	BSD makefile script text
840325
-!:mime	text/x-makefile
840325
-!:ext	/mk
840325
-!:strength +10
840325
 # exclude MS Windows help file CoNtenT with ":include FOOBAR.CNT"
840325
 # and NSIS script with "!include" by additional escaping point character
840325
-0	regex/100l	\^\\.include	BSD makefile script text
840325
-!:mime	text/x-makefile
840325
-!:ext	/mk
840325
-!:strength +10
840325
-0	regex/100l	\^\\.endif	BSD makefile script text
840325
+0	regex/100l	\^\\.(BEGIN|endif|include)	BSD makefile script text
840325
 !:mime	text/x-makefile
840325
 !:ext	/mk
840325
-!:strength +10
840325
-0	regex/100l	\^SUBDIRS	automake makefile script text
840325
+!:strength -10
840325
+0	regex/100l	\^SUBDIRS[[:space:]]+=	automake makefile script text
840325
 !:mime	text/x-makefile
840325
-!:strength +10
840325
+!:strength -15