From 93774317fae6b7f370a43c50f8811e1f8e1f0d5c Mon Sep 17 00:00:00 2001 From: JustOff Date: Sat, 2 Jun 2018 21:05:05 +0300 Subject: Don't search for directives that are never used alone --- python/mozbuild/mozbuild/mach_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/mozbuild') diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 78d9b40be..1bd5b8d34 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -543,7 +543,8 @@ class Build(MachCommandBase): # Check if there are any unpreprocessed files in '@MOZ_OBJDIR@/dist/bin' # See python/mozbuild/mozbuild/preprocessor.py#L293-L309 for the list of directives - grepcmd = 'grep -E -r "^(#|%)(define|el|endif|error|expand|filter|if|include|literal|undef|unfilter)" '\ + # We skip if, ifdef, ifndef, else, elif, elifdef and elifndef, because they are never used alone + grepcmd = 'grep -E -r "^(#|%)(define|endif|error|expand|filter|include|literal|undef|unfilter)" '\ + '--include=\*.{css,dtd,html,js,jsm,xhtml,xml,xul,manifest,properties,rdf} '\ + self.topobjdir + '/dist/bin | grep -v ".css:#"' grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0] -- cgit v1.2.3