| Kevin Lubick | 30cc00c | 2018-08-03 10:26:00 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # Copyright 2018 Google LLC |
| 3 | # |
| 4 | # Use of this source code is governed by a BSD-style license that can be |
| 5 | # found in the LICENSE file. |
| 6 | |
| Kevin Lubick | fa5a138 | 2019-10-09 10:46:14 -0400 | [diff] [blame] | 7 | # This assumes it is being run inside a docker container of emsdk-base |
| Kevin Lubick | 30cc00c | 2018-08-03 10:26:00 -0400 | [diff] [blame] | 8 | # and a Skia checkout has been mounted at /SRC and the output directory |
| 9 | # is mounted at /OUT |
| 10 | |
| Kevin Lubick | 8e9750d | 2018-10-09 09:36:35 -0400 | [diff] [blame] | 11 | set +e |
| 12 | set -x |
| 13 | # Clean out previous builds (ignoring any errors for things like folders) |
| 14 | # (e.g. we don't want to delete /OUT/depot_tools/) |
| 15 | rm -f /OUT/* |
| Kevin Lubick | 559185a | 2021-06-24 14:32:41 -0400 | [diff] [blame] | 16 | # We want to clean out previously generated code and object files to avoid |
| 17 | # previous builds contaminating this one. |
| 18 | rm -rf /OUT/gen |
| 19 | rm -rf /OUT/obj |
| Kevin Lubick | 8e9750d | 2018-10-09 09:36:35 -0400 | [diff] [blame] | 20 | set -e |
| 21 | |
| 22 | #BASE_DIR is the dir this script is in ($SKIA_ROOT/infra/pathkit) |
| Kevin Lubick | 30cc00c | 2018-08-03 10:26:00 -0400 | [diff] [blame] | 23 | BASE_DIR=`cd $(dirname ${BASH_SOURCE[0]}) && pwd` |
| Kevin Lubick | 8e9750d | 2018-10-09 09:36:35 -0400 | [diff] [blame] | 24 | PATHKIT_DIR=$BASE_DIR/../../modules/pathkit |
| Kevin Lubick | 4968843 | 2018-10-08 13:58:47 -0400 | [diff] [blame] | 25 | |
| Kevin Lubick | a0ba612 | 2018-08-15 13:45:28 -0400 | [diff] [blame] | 26 | BUILD_DIR=/OUT $PATHKIT_DIR/compile.sh $@ |
| Kevin Lubick | e70c6b1 | 2018-11-06 07:49:40 -0500 | [diff] [blame] | 27 | |