On second thought, using % just isn't correct. When a make
target looks like:
foo% bar%:
...
Then that implies that it will build BOTH foo% and bar% whenever
that rule is triggered (by either) for any value of the pattern %.
Clearly that is not what we want / intend.
So, this commit goes back to using config targets without a % in it
by generating a full list of them.
It also turns sitl_deprecation into a Hidden Target.
Finally, now that we have those target lists anyway, I added
a 'help' and 'list_config_targets' targets that print the
available targets.
Note that the '%' catch-all target only works when all other targets
either have a recipe or are marked as .PHONY, otherwise such targets
are only interpretted as dependencies and still executre the '%'
target afterwards, which is not what we want.
# 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."),@#)
.PHONY:clean
@ -303,3 +301,22 @@ CONFIGS:=$(shell ls cmake/configs | sed -e "s~.*/~~" | sed -e "s~\..*~~")
@@ -303,3 +301,22 @@ CONFIGS:=$(shell ls cmake/configs | sed -e "s~.*/~~" | sed -e "s~\..*~~")
# @echo "Type 'make ' and hit the tab key twice to see a list of the available"
# @echo "build configurations."
# @echo
empty:=
space:=$(empty)$(empty)
# Print a list of non-config targets (based on http://stackoverflow.com/a/26339924/1487069)