diff options
author | New Tobin Paradigm <email@mattatobin.com> | 2020-04-04 18:10:10 -0400 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-14 13:24:17 +0200 |
commit | b470422d5a86f5e6c97bfe7a935b4abd9e167077 (patch) | |
tree | 7592e15af8d56f5822630d4df80e8fc8408028fe /python/mozbuild | |
parent | 449d530a3037e65cb045bcd2cb8a28d33ce1493a (diff) | |
download | UXP-b470422d5a86f5e6c97bfe7a935b4abd9e167077.tar UXP-b470422d5a86f5e6c97bfe7a935b4abd9e167077.tar.gz UXP-b470422d5a86f5e6c97bfe7a935b4abd9e167077.tar.lz UXP-b470422d5a86f5e6c97bfe7a935b4abd9e167077.tar.xz UXP-b470422d5a86f5e6c97bfe7a935b4abd9e167077.zip |
Issue #1497 - Re-implement an un-preprocessed file check
Diffstat (limited to 'python/mozbuild')
-rw-r--r-- | python/mozbuild/mozbuild/mach_commands.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 6e57ab5ae..bd3fbe921 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -541,6 +541,25 @@ class Build(MachCommandBase): # as when doing OSX Universal builds) pass + # Check for un-preprocessed files.. In case something goes wrong it will be noted + ppcheck_script = mozpath.join(self.topsrcdir, "build", "ppCheck.py") + ppcheck_path = mozpath.join(self.topobjdir, "dist", "bin") + if not os.path.exists(ppcheck_script): + ppcheck_script = mozpath.join(self.topsrcdir, "mozilla", "build", "ppCheck.py") + + if not os.path.exists(ppcheck_script): + ppcheck_script = mozpath.join(self.topsrcdir, "platform", "build", "ppCheck.py") + else: + ppcheck_script = None + + if ppcheck_script: + ppcheck_cmd = [which.which("python2.7"), ppcheck_script, ppcheck_path] + ppcheck_result = subprocess.call(ppcheck_cmd, cwd=self.topsrcdir) + + if not ppcheck_script or ppcheck_result: + print("\nWARNING: Something has gone wrong with the check for un-preprocessed files. " + + "Please manually verify that files are properly preprocessed.") + return status @Command('configure', category='build', |