From 2441181bdf16ec81c56fc34b16dc630097b41263 Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Wed, 20 May 2020 07:08:09 -0700 Subject: [PATCH] Delete deps-license target. If used, the results would be inaccurate in any case. Deleted atest references: http://aosp/1315404 http://aosp/1315405 Test: treehugger Test: atest -c --rebuild-module-info com.google.android.gts.updateengine.UpdateEngineHostTest Change-Id: I6efbf1f5ff3a533b26d6bbedc14a6fcc1b200391 --- core/config.mk | 4 +-- core/ninja_config.mk | 1 - core/tasks/deps_licenses.mk | 59 ------------------------------------- 3 files changed, 2 insertions(+), 62 deletions(-) delete mode 100644 core/tasks/deps_licenses.mk diff --git a/core/config.mk b/core/config.mk index 3d08ba402..d7072753e 100644 --- a/core/config.mk +++ b/core/config.mk @@ -1215,7 +1215,7 @@ endif DEFAULT_DATA_OUT_MODULES := ltp $(ltp_packages) $(kselftest_modules) .KATI_READONLY := DEFAULT_DATA_OUT_MODULES -# Make RECORD_ALL_DEPS readonly and also set it if deps-license is a goal. -RECORD_ALL_DEPS :=$= $(filter true,$(RECORD_ALL_DEPS))$(filter deps-license,$(MAKECMDGOALS)) +# Make RECORD_ALL_DEPS readonly. +RECORD_ALL_DEPS :=$= $(filter true,$(RECORD_ALL_DEPS)) include $(BUILD_SYSTEM)/dumpvar.mk diff --git a/core/ninja_config.mk b/core/ninja_config.mk index 1ead512a8..336048fe3 100644 --- a/core/ninja_config.mk +++ b/core/ninja_config.mk @@ -24,7 +24,6 @@ PARSE_TIME_MAKE_GOALS := \ continuous_native_tests \ cts \ custom_images \ - deps-license \ dicttool_aosp \ dump-products \ eng \ diff --git a/core/tasks/deps_licenses.mk b/core/tasks/deps_licenses.mk deleted file mode 100644 index daf986f60..000000000 --- a/core/tasks/deps_licenses.mk +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (C) 2015 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Print modules and their transitive dependencies with license files. -# To invoke, run "make deps-license PROJ_PATH= DEP_PATH=". -# PROJ_PATH restricts the paths of the source modules; DEP_PATH restricts the paths of the dependency modules. -# Both can be makefile patterns supported by makefile function $(filter). -# Example: "make deps-license packages/app/% external/%" prints all modules in packages/app/ with their dpendencies in external/. -# The printout lines look like " :: :: ". - -ifneq (,$(filter deps-license,$(MAKECMDGOALS))) -ifndef PROJ_PATH -$(error To "make deps-license" you must specify PROJ_PATH and DEP_PATH.) -endif -ifndef DEP_PATH -$(error To "make deps-license" you must specify PROJ_PATH and DEP_PATH.) -endif - -# Expand a module's dependencies transitively. -# $(1): the variable name to hold the result. -# $(2): the initial module name. -define get-module-all-dependencies -$(eval _gmad_new := $(sort $(filter-out $($(1)),\ - $(foreach m,$(2),$(ALL_DEPS.$(m).ALL_DEPS)))))\ -$(if $(_gmad_new),$(eval $(1) += $(_gmad_new))\ - $(call get-module-all-dependencies,$(1),$(_gmad_new))) -endef - -define print-deps-license -$(foreach m, $(sort $(ALL_DEPS.MODULES)),\ - $(eval m_p := $(sort $(ALL_MODULES.$(m).PATH) $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).PATH)))\ - $(if $(filter $(PROJ_PATH),$(m_p)),\ - $(eval deps :=)\ - $(eval $(call get-module-all-dependencies,deps,$(m)))\ - $(info $(m) :: $(m_p) :: $(ALL_DEPS.$(m).LICENSE))\ - $(foreach d,$(deps),\ - $(eval d_p := $(sort $(ALL_MODULES.$(d).PATH) $(ALL_MODULES.$(d)$(TARGET_2ND_ARCH_MODULE_SUFFIX).PATH)))\ - $(if $(filter $(DEP_PATH),$(d_p)),\ - $(info $(space)$(space)$(space)$(space)$(d) :: $(d_p) :: $(ALL_DEPS.$(d).LICENSE)))))) -endef - -.PHONY: deps-license -deps-license: - @$(call print-deps-license) - -endif