From 38fc1d39ffd6eec587b2daf7bfa129e7abe9ba0c Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Fri, 20 Dec 2019 19:39:50 -0800 Subject: [PATCH] add option to not do a clean st build --- python/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/__init__.py b/python/__init__.py index 436e72a6..ea8dea13 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -23,14 +23,14 @@ BASEDIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../") DEBUG = os.getenv("PANDADEBUG") is not None # *** wifi mode *** -def build_st(target, mkfile="Makefile"): +def build_st(target, mkfile="Makefile", clean=True): from panda import BASEDIR - cmd = 'cd %s && make -f %s clean && make -f %s %s >/dev/null' % (os.path.join(BASEDIR, "board"), mkfile, mkfile, target) + + clean_cmd = "make -f %s clean" % mkfile if clean else ":" + cmd = 'cd %s && %s && make -f %s %s' % (os.path.join(BASEDIR, "board"), clean_cmd, mkfile, target) try: _ = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) except subprocess.CalledProcessError: - #output = exception.output - #returncode = exception.returncode raise def parse_can_buffer(dat):