diff options
| author | Sudar Muthu <sudar@sudarmuthu.com> | 2018-09-30 20:13:29 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-30 20:13:29 +0530 |
| commit | fe84c591944f74c902466d813fae0d164761dc59 (patch) | |
| tree | 5c29b0153379c57c9d75e1c03b9fef987fb82015 /Common.mk | |
| parent | 089b535601b6411eb8055d449125888bcc666aa1 (diff) | |
| parent | 62d23d66a2f9326235022bfd8711c62e015c0bc8 (diff) | |
Merge pull request #580 from wingunder/master
Moved the PARSE_BOARD macro and added the TOOL_PREFIX variable for setting up tool chains.
Diffstat (limited to 'Common.mk')
| -rw-r--r-- | Common.mk | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -5,6 +5,17 @@ COMMON_INCLUDED = TRUE # (directory and optional filename) exists dir_if_exists = $(if $(wildcard $(1)$(2)),$(1)) +ifndef PARSE_BOARD +# result = $(call READ_BOARD_TXT, 'boardname', 'parameter') +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. runscript_if_exists = \ $(if $(wildcard $(1)), \ |
