#!/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]
clangFormat = sys.argv[2]
fetchClangFormat = sys.argv[3]
processors = sys.argv[4:]

exeSuffix = '.exe' if sys.platform.startswith('win') else '';

for p in processors:
    print("Recompiling " + p + "...")
    try:
        if not os.path.isfile(clangFormat + exeSuffix):
            subprocess.check_call([sys.executable, fetchClangFormat]);

        noExt, _ = os.path.splitext(p)
        head, tail = os.path.split(noExt)
        targetDir = os.path.join(head, "generated")
        if not os.path.isdir(targetDir):
            os.mkdir(targetDir)
        target = os.path.join(targetDir, tail)
        subprocess.check_output([skslc, p, target + ".h"])
        subprocess.check_call(clangFormat + " --sort-includes=false -i \"" +
                              target + ".h\"", shell=True)
        subprocess.check_output([skslc, p, target + ".cpp"])
        subprocess.check_call(clangFormat + " --sort-includes=false -i \"" +
                              target + ".cpp\"", shell=True)
    except subprocess.CalledProcessError as err:
        print("### Error compiling " + p + ":")
        print(err.output)
        exit(1)

#!/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]
clangFormat = sys.argv[2]
fetchClangFormat = sys.argv[3]
processors = sys.argv[4:]

exeSuffix = '.exe' if sys.platform.startswith('win') else '';

for p in processors:
    try:
        if not os.path.isfile(clangFormat + exeSuffix):
            subprocess.check_call([sys.executable, fetchClangFormat]);

        noExt, _ = os.path.splitext(p)
        head, tail = os.path.split(noExt)
        targetDir = os.path.join(head, "generated")
        if not os.path.isdir(targetDir):
            os.mkdir(targetDir)
        target = os.path.join(targetDir, tail)
        subprocess.check_output([skslc, p, target + ".h"])
        subprocess.check_call(clangFormat + " --sort-includes=false -i \"" +
                              target + ".h\"", shell=True)
        subprocess.check_output([skslc, p, target + ".cpp"])
        subprocess.check_call(clangFormat + " --sort-includes=false -i \"" +
                              target + ".cpp\"", shell=True)
    except subprocess.CalledProcessError as err:
        print("### Error compiling " + p + ":")
        print(err.output)
        exit(1)

Remove "Recompiling..." output when building .fp files
Remove "Recompiling..." output when building .fp files

Change-Id: I41402dc04d4388217d7f7cd8de9aff8fbb4a3765
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/317391
Reviewed-by: John Stiles <f4fcf42d3bb5924557f1eeb3be66747535e585da@google.com>
Commit-Queue: Brian Osman <794c0b5534edf5601d88e1d41975d0262da12894@google.com>
