From 5eea89ccccd99be409bdb96fe43ba1198a50d1c2 Mon Sep 17 00:00:00 2001 From: "Alexander W. Schultz" Date: Thu, 14 Nov 2024 08:28:19 -0500 Subject: [PATCH] feature: build.py now allows for space separated lists of files. this is a stepping stone to going to a full Makefile build system. All src files can be provided in the make and sent to build.py with minimal issues now that we don't have to build a comma separated list. --- src/build.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/build.py b/src/build.py index ba29fef8..ff5c455d 100644 --- a/src/build.py +++ b/src/build.py @@ -9,6 +9,7 @@ def print_help(): """usage: python single_header_packer.py --macro [--intro ] --extern --pub --priv1 --priv2 [--outro ] where can be a comma-separated list of files. e.g. --priv *.c,inc/*.h + or a space separated list encapsulated in quotes. e.g. --priv1 "file.c file2.c file3.c" The 'extern' files are placed between 'priv1' and 'priv2'. @@ -33,7 +34,8 @@ def print_help(): def parse_files(arg): files = [] - paths = arg.split(",") + paths = re.split(r'[,\s]', arg) + for path in paths: if "*" in path: # Wildcard