Skip to content

Commit

Permalink
[WIP] Clarify FOREACH_MAKE_OPTIONAL error message
Browse files Browse the repository at this point in the history
With the use of the `||` operator a sub-dir Makefile can fail if there is an error,
not only because that make target does not exist in the subdir Makefile declaration.
  • Loading branch information
aj-stein-nist committed Feb 1, 2024
1 parent 65950cd commit f97c378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/testing/make_common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ endef
# Run a Makefile target for each directory, skipping directories whose Makefile does not contain a rule
define FOREACH_MAKE_OPTIONAL
@echo Running makefile target \'$1\' on all subdirectory makefiles that contain the rule
@$(call FOREACH,dir,$2,$(MAKE) -C $$dir -n $1 &> /dev/null && $(MAKE) -C $$dir $1 || echo "Makefile target '$1' does not exist in "$$dir". Continuing...")
@$(call FOREACH,dir,$2,$(MAKE) -C $$dir -n $1 &> /dev/null && $(MAKE) -C $$dir $1 || echo "Makefile target '$1' failed or does not exist in "$$dir". Continuing...")
endef

0 comments on commit f97c378

Please sign in to comment.