1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-26 13:58:49 +00:00

Don't search for directives that are never used alone

This commit is contained in:
JustOff
2018-06-02 21:05:05 +03:00
committed by Roy Tam
parent c7ed9dfd46
commit 5dd561425b
+2 -1
View File
@@ -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]