From 0468922b50702cbaa6f1c26c7f982eb8100915f6 Mon Sep 17 00:00:00 2001 From: JustOff Date: Fri, 1 Jun 2018 00:54:53 +0300 Subject: Check if there are any unpreprocessed files --- python/mozbuild/mozbuild/mach_commands.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index f654db769..9e769653e 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -541,6 +541,13 @@ class Build(MachCommandBase): # as when doing OSX Universal builds) pass + # Check if there are any unpreprocessed files + grepcmd = 'grep -E -r "^(#|%)ifdef" --include=\*.{js\*,css,x\*,h\*,manifest,dtd,properties} '\ + + self.topobjdir + '/dist/bin' + grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0] + if grepresult: + print('\nERROR: preprocessor was not applied to the following files:\n\n' + grepresult) + return status @Command('configure', category='build', -- cgit v1.2.3