blob: 5a34fc574951885a4a711f207ad737dc619b8a8c [file] [log] [blame]
Kevin Lubick30cc00c2018-08-03 10:26:00 -04001#!/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 Lubickfa5a1382019-10-09 10:46:14 -04007# This assumes it is being run inside a docker container of emsdk-base
Kevin Lubick30cc00c2018-08-03 10:26:00 -04008# and a Skia checkout has been mounted at /SRC and the output directory
9# is mounted at /OUT
10
Kevin Lubick8e9750d2018-10-09 09:36:35 -040011set +e
12set -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/)
15rm -f /OUT/*
Kevin Lubick559185a2021-06-24 14:32:41 -040016# We want to clean out previously generated code and object files to avoid
17# previous builds contaminating this one.
18rm -rf /OUT/gen
19rm -rf /OUT/obj
Kevin Lubick8e9750d2018-10-09 09:36:35 -040020set -e
21
22#BASE_DIR is the dir this script is in ($SKIA_ROOT/infra/pathkit)
Kevin Lubick30cc00c2018-08-03 10:26:00 -040023BASE_DIR=`cd $(dirname ${BASH_SOURCE[0]}) && pwd`
Kevin Lubick8e9750d2018-10-09 09:36:35 -040024PATHKIT_DIR=$BASE_DIR/../../modules/pathkit
Kevin Lubick49688432018-10-08 13:58:47 -040025
Kevin Lubicka0ba6122018-08-15 13:45:28 -040026BUILD_DIR=/OUT $PATHKIT_DIR/compile.sh $@
Kevin Lubicke70c6b12018-11-06 07:49:40 -050027