aboutsummaryrefslogtreecommitdiff
path: root/Common.mk
diff options
context:
space:
mode:
Diffstat (limited to 'Common.mk')
-rw-r--r--Common.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/Common.mk b/Common.mk
index 6209b03..c5f2bc2 100644
--- a/Common.mk
+++ b/Common.mk
@@ -7,7 +7,13 @@ dir_if_exists = $(if $(wildcard $(1)$(2)),$(1))
ifndef PARSE_BOARD
# result = $(call READ_BOARD_TXT, 'boardname', 'parameter')
-PARSE_BOARD = $(shell grep -Ev '^\#' $(BOARDS_TXT) | grep -E "^[ \t]*$(1).$(2)=" | cut -d = -f 2 | cut -d : -f 2)
+PARSE_BOARD = $(shell if [ -f $(BOARDS_TXT) ]; \
+then \
+ grep -Ev '^\#' $(BOARDS_TXT) | \
+ grep -E "^[ \t]*$(1).$(2)=" | \
+ cut -d = -f 2 | \
+ cut -d : -f 2; \
+fi)
endif
# Run a shell script if it exists. Stops make on error.