core: catch failures in graph-depends
Currently, we generate the dependency graph in a single command, piping the stdout of support/scripts/.graph-depends to the stdin of dot. Unfortunately, this means we can't catch a failure of graph-depends, as the shell can only treturn the exit code of the last command in a pipe. Still, we do want to keep the output of graph-depends, and we in fact do keep it by mean of a tee. graph-depends has just gained the ability to generate its output to a file, so we break the pipe in two differnet commands, so we can bail out on graph-depends errors. Do that for the two call sites. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
a3f75bcc76
commit
5e7020ef64
6
Makefile
6
Makefile
@ -721,8 +721,10 @@ graph-depends: graph-depends-requirements
|
|||||||
@$(INSTALL) -d $(GRAPHS_DIR)
|
@$(INSTALL) -d $(GRAPHS_DIR)
|
||||||
@cd "$(CONFIG_DIR)"; \
|
@cd "$(CONFIG_DIR)"; \
|
||||||
$(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \
|
$(TOPDIR)/support/scripts/graph-depends $(BR2_GRAPH_DEPS_OPTS) \
|
||||||
|tee $(GRAPHS_DIR)/$(@).dot \
|
-o $(GRAPHS_DIR)/$(@).dot
|
||||||
|dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) -o $(GRAPHS_DIR)/$(@).$(BR_GRAPH_OUT)
|
dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) \
|
||||||
|
-o $(GRAPHS_DIR)/$(@).$(BR_GRAPH_OUT) \
|
||||||
|
$(GRAPHS_DIR)/$(@).dot
|
||||||
|
|
||||||
graph-size:
|
graph-size:
|
||||||
$(Q)mkdir -p $(GRAPHS_DIR)
|
$(Q)mkdir -p $(GRAPHS_DIR)
|
||||||
|
@ -668,9 +668,11 @@ $(1)-show-depends:
|
|||||||
$(1)-graph-depends: graph-depends-requirements
|
$(1)-graph-depends: graph-depends-requirements
|
||||||
@$$(INSTALL) -d $$(GRAPHS_DIR)
|
@$$(INSTALL) -d $$(GRAPHS_DIR)
|
||||||
@cd "$$(CONFIG_DIR)"; \
|
@cd "$$(CONFIG_DIR)"; \
|
||||||
$$(TOPDIR)/support/scripts/graph-depends -p $(1) $$(BR2_GRAPH_DEPS_OPTS) \
|
$$(TOPDIR)/support/scripts/graph-depends $$(BR2_GRAPH_DEPS_OPTS) \
|
||||||
|tee $$(GRAPHS_DIR)/$$(@).dot \
|
-p $(1) -o $$(GRAPHS_DIR)/$$(@).dot
|
||||||
|dot $$(BR2_GRAPH_DOT_OPTS) -T$$(BR_GRAPH_OUT) -o $$(GRAPHS_DIR)/$$(@).$$(BR_GRAPH_OUT)
|
dot $$(BR2_GRAPH_DOT_OPTS) -T$$(BR_GRAPH_OUT) \
|
||||||
|
-o $$(GRAPHS_DIR)/$$(@).$$(BR_GRAPH_OUT) \
|
||||||
|
$$(GRAPHS_DIR)/$$(@).dot
|
||||||
|
|
||||||
$(1)-all-source: $(1)-source
|
$(1)-all-source: $(1)-source
|
||||||
$(1)-all-source: $$(foreach p,$$($(2)_FINAL_ALL_DEPENDENCIES),$$(p)-all-source)
|
$(1)-all-source: $$(foreach p,$$($(2)_FINAL_ALL_DEPENDENCIES),$$(p)-all-source)
|
||||||
|
Loading…
Reference in New Issue
Block a user