b7e8c3b52a
Bug: skia: Change-Id: I97af420d1c3270e24e5d0959237b8163faa9e069 Reviewed-on: https://skia-review.googlesource.com/24646 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
28 lines
867 B
Python
Executable File
28 lines
867 B
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
# Copyright 2017 Google Inc.
|
|
#
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
import os
|
|
import subprocess
|
|
import sys
|
|
|
|
skslc = sys.argv[1]
|
|
processors = sys.argv[2:]
|
|
for p in processors:
|
|
path, _ = os.path.splitext(p)
|
|
print("Recompiling " + p + "...")
|
|
try:
|
|
subprocess.check_output([skslc, p, path + ".h"])
|
|
subprocess.check_call("clang-format --sort-includes=false -i \"" +
|
|
path + ".h\"", shell=True)
|
|
subprocess.check_output([skslc, p, path + ".cpp"])
|
|
subprocess.check_call("clang-format --sort-includes=false -i \"" +
|
|
path + ".cpp\"", shell=True)
|
|
except subprocess.CalledProcessError as err:
|
|
print("### Error compiling " + p + ":")
|
|
print(err.output)
|
|
exit(1)
|