Makefile: rename TARGETS to PACKAGES

For clarity, this commit renames the TARGETS variable to the more
meaningful PACKAGES variable. Indeed, only packages (handled by one of
the package infrastructures) should be listed in this variable, and
not other random non-package targets.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
This commit is contained in:
Thomas Petazzoni
2015-04-12 18:37:48 +02:00
parent 93f911f1ba
commit 8a58e0238e
5 changed files with 15 additions and 15 deletions

View File

@@ -297,7 +297,7 @@ unexport MACHINE
GNU_HOST_NAME := $(shell support/gnuconfig/config.guess)
TARGETS :=
PACKAGES :=
# silent mode requested?
QUIET := $(if $(findstring s,$(filter-out --%,$(MAKEFLAGS))),-q)
@@ -389,16 +389,16 @@ include fs/common.mk
include $(BR2_EXTERNAL)/external.mk
TARGETS_SOURCE := $(patsubst %,%-source,$(TARGETS))
PACKAGES_SOURCE := $(patsubst %,%-source,$(PACKAGES))
# host-* dependencies have to be handled specially, as those aren't
# visible in Kconfig and hence not added to a variable like TARGETS.
# visible in Kconfig and hence not added to a variable like PACKAGES.
# instead, find all the host-* targets listed in each <PKG>_DEPENDENCIES
# variable for each enabled target.
# Notice: this only works for newstyle gentargets/autotargets packages
TARGETS_HOST_DEPS = $(sort $(filter host-%,$(foreach dep,\
$(addsuffix _DEPENDENCIES,\
$(call UPPERCASE,$(TARGETS) $(TARGETS_ROOTFS))),\
$(call UPPERCASE,$(PACKAGES) $(TARGETS_ROOTFS))),\
$($(dep)))))
# Host packages can in turn have their own dependencies. Likewise find
# all the package names listed in the HOST_<PKG>_DEPENDENCIES for each
@@ -410,8 +410,8 @@ HOST_DEPS = $(sort $(foreach dep,\
$($(dep))))
HOST_SOURCE += $(addsuffix -source,$(sort $(TARGETS_HOST_DEPS) $(HOST_DEPS)))
TARGETS_LEGAL_INFO := $(patsubst %,%-legal-info,\
$(TARGETS) $(TARGETS_HOST_DEPS) $(HOST_DEPS))
PACKAGES_LEGAL_INFO := $(patsubst %,%-legal-info,\
$(PACKAGES) $(TARGETS_HOST_DEPS) $(HOST_DEPS))
dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \
$(HOST_DIR) $(BINARIES_DIR)
@@ -505,7 +505,7 @@ endif
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
GLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE))
ifneq ($(GLIBC_GENERATE_LOCALES),)
TARGETS += host-localedef
PACKAGES += host-localedef
define GENERATE_GLIBC_LOCALES
$(Q)mkdir -p $(TARGET_DIR)/usr/lib/locale/
@@ -549,7 +549,7 @@ endif
$(TARGETS_ROOTFS): target-finalize
target-finalize: $(TARGETS)
target-finalize: $(PACKAGES)
@$(call MESSAGE,"Finalizing target directory")
$(foreach hook,$(TARGET_FINALIZE_HOOKS),$($(hook))$(sep))
rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
@@ -613,7 +613,7 @@ target-post-image: $(TARGETS_ROOTFS) target-finalize
$(call MESSAGE,"Executing post-image script $(s)"); \
$(EXTRA_ENV) $(s) $(BINARIES_DIR) $(call qstrip,$(BR2_ROOTFS_POST_SCRIPT_ARGS))$(sep))
source: $(TARGETS_SOURCE) $(HOST_SOURCE)
source: $(PACKAGES_SOURCE) $(HOST_SOURCE)
external-deps:
@$(MAKE1) -Bs DL_MODE=SHOW_EXTERNAL_DEPS $(EXTRAMAKEARGS) source | sort -u
@@ -631,7 +631,7 @@ legal-info-prepare: $(LEGAL_INFO_DIR)
@$(call legal-warning,the toolchain has not been saved)
@cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config
legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \
legal-info: dirs legal-info-clean legal-info-prepare $(PACKAGES_LEGAL_INFO) \
$(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST)
@cat support/legal-info/README.header >>$(LEGAL_REPORT)
@if [ -r $(LEGAL_WARNINGS) ]; then \
@@ -642,7 +642,7 @@ legal-info: dirs legal-info-clean legal-info-prepare $(TARGETS_LEGAL_INFO) \
@rm -f $(LEGAL_WARNINGS)
show-targets:
@echo $(HOST_DEPS) $(TARGETS_HOST_DEPS) $(TARGETS) $(TARGETS_ROOTFS)
@echo $(HOST_DEPS) $(TARGETS_HOST_DEPS) $(PACKAGES) $(TARGETS_ROOTFS)
graph-build: $(O)/build/build-time.log
@install -d $(GRAPHS_DIR)