From dadcee1a5d828e92fa19d3539542ca06b1ca29c4 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Sat, 25 Jan 2020 16:33:12 +0100 Subject: [PATCH] Makefile: Improve the error message if a target is not found The previous error message was misleading. The new more verbose error indicates that either the target does not exist or the ordering is wrong. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0ecb75446f..e4cd716000 100644 --- a/Makefile +++ b/Makefile @@ -480,7 +480,7 @@ distclean: gazeboclean # All other targets are handled by PX4_MAKE. Add a rule here to avoid printing an error. %: $(if $(filter $(FIRST_ARG),$@), \ - $(error "$@ cannot be the first argument. Use '$(MAKE) help|list_config_targets' to get a list of all possible [configuration] targets."),@#) + $(error "Make target $@ not found. It either does not exist or $@ cannot be the first argument. Use '$(MAKE) help|list_config_targets' to get a list of all possible [configuration] targets."),@#) # Print a list of non-config targets (based on http://stackoverflow.com/a/26339924/1487069) help: