Makefile/cmake remove legacy target naming transition helpers

This commit is contained in:
Daniel Agar 2020-02-08 14:38:56 -05:00 committed by GitHub
parent c6c7f963ac
commit 13a6d57703
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 32 deletions

View File

@ -209,23 +209,13 @@ $(CONFIG_TARGETS_DEFAULT):
all_config_targets: $(ALL_CONFIG_TARGETS)
all_default_targets: $(CONFIG_TARGETS_DEFAULT)
posix: px4_sitl_default
# board reorganization deprecation warnings (2018-11-22)
define deprecation_warning
$(warning $(1) has been deprecated and will be removed, please use $(2)!)
endef
px4fmu-%_default:
$(call deprecation_warning, ${@},$(subst px4fmu,px4_fmu,$@))
$(MAKE) $(subst px4fmu,px4_fmu, $@)
posix_sitl_default:
$(call deprecation_warning, ${@},px4_sitl_default)
$(MAKE) px4_sitl_default
# All targets with just dependencies but no recipe must either be marked as phony (or have the special @: as recipe).
.PHONY: all posix px4_sitl_default all_config_targets all_default_targets
.PHONY: all px4_sitl_default all_config_targets all_default_targets
# Multi- config targets.
eagle_default: atlflight_eagle_default atlflight_eagle_qurt
@ -287,7 +277,7 @@ sizes:
# All default targets that don't require a special build environment
check: check_px4_sitl_default px4fmu_firmware misc_qgc_extra_firmware alt_firmware tests check_format
# quick_check builds a single nuttx and posix target, runs testing, and checks the style
# quick_check builds a single nuttx and SITL target, runs testing, and checks the style
quick_check: check_px4_sitl_test check_px4_fmu-v5_default tests check_format
check_%:

View File

@ -73,27 +73,7 @@ if(NOT PX4_CONFIG_FILE)
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
break()
endif()
# LEGACY form
# <OS>_<BOARD>_<LABEL> (eg nuttx_px4_fmu-v2_default)
string(REGEX REPLACE "^nuttx_|^posix_|^qurt_" "" config_no_os ${CONFIG}) # ignore OS prefix
if ((${config_no_os} MATCHES "${board}_${label}"))
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
break()
endif()
# LEGACY form special case to ease board layout transition (2018-11-18)
# match board with model and label only: eg sitl_default -> px4_sitl_default
if ((${config_no_os} MATCHES "${model}_${label}"))
set(PX4_CONFIG_FILE "${PX4_SOURCE_DIR}/boards/${filename}" CACHE FILEPATH "path to PX4 CONFIG file" FORCE)
break()
endif()
endif()
endforeach()
endif()