From f99645ede88693a9d7ea996c7001d0e62e8a31b6 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 24 Mar 2020 22:47:15 +0700 Subject: [PATCH] more clean up --- Makefile | 4 ++-- tools/build_all.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 448fc51..e0b0eb6 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ GDB := $(CROSS_COMPILE)gdb NRFUTIL = adafruit-nrfutil NRFJPROG = nrfjprog -MK := mkdir +MK := mkdir -p RM := rm -rf # Verbose mode (V=). 0: default, 1: print out CFLAG, LDFLAG 2: print all compile command @@ -75,7 +75,7 @@ ifeq ($(filter $(BOARD),$(BOARD_LIST)),) endif # Build directory -BUILD = _build-$(BOARD) +BUILD = _build/build-$(BOARD) # Board specific -include src/boards/$(BOARD)/board.mk diff --git a/tools/build_all.py b/tools/build_all.py index bd3eeb2..09e1b15 100644 --- a/tools/build_all.py +++ b/tools/build_all.py @@ -5,8 +5,8 @@ import sys import subprocess import time -subprocess.run("rm -rf _build*", shell=True) -subprocess.run("rm -rf bin/*", shell=True) +subprocess.run("rm -rf _build/", shell=True) +subprocess.run("rm -rf bin/", shell=True) success_count = 0 fail_count = 0 @@ -45,12 +45,12 @@ for board in all_boards: success = "\033[31mfailed\033[0m " fail_count += 1 - for entry in os.scandir("_build-{}".format(board)): + for entry in os.scandir("_build/build-{}".format(board)): for extension in ["zip", "hex"]: if entry.name.endswith(extension) and "nosd" not in entry.name: shutil.copy(entry.path, bin_directory) - out_file = glob.glob('_build-{}/*.out'.format(board))[0] + out_file = glob.glob('_build/build-{}/*.out'.format(board))[0] size_output = subprocess.run('size {}'.format(out_file), shell=True, stdout=subprocess.PIPE).stdout.decode("utf-8") size_list = size_output.split('\n')[1].split('\t') flash_size = int(size_list[0])