summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJustOff <Off.Just.Off@gmail.com>2018-06-02 21:05:05 +0300
committerJustOff <Off.Just.Off@gmail.com>2018-06-02 21:05:05 +0300
commit47330734dc69e86162129da3d574bf2109bc8b9e (patch)
tree0912424cf53dda9dc46175675787536e2c6d0e95 /python
parentac98f819f928b653e8551540c9b74fa5e829eddb (diff)
downloaduxp-47330734dc69e86162129da3d574bf2109bc8b9e.tar.gz
Don't search for directives that are never used alone
Diffstat (limited to 'python')
-rw-r--r--python/mozbuild/mozbuild/mach_commands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
index 78d9b40be5..1bd5b8d340 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]