blob: 1a3a4c551738f810ffb8cd0dd4f8d463fa35ef32 [file] [log] [blame]
Julien Desprez92581482021-02-02 15:53:38 -08001# Copyright (C) 2020 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH := $(call my-dir)
16include $(CLEAR_VARS)
17
18ifeq (,$(wildcard $(LOCAL_PATH)/../../core))
19.PHONY: tradefed-all
20tradefed-all: tradefed
21
22tradefed_dist_artifacts := tradefed.jar tradefed-tests.jar tradefed-test-framework.jar loganalysis.jar loganalysis-tests.jar tradefed-contrib.jar tf-contrib-tests.jar tradefed-isolation.jar tradefed.sh tradefed_win.bat script_help.sh atest_tradefed.sh TradeFedUiTestApp.apk TradeFedTestApp.apk version.txt
23
24tradefed_dist_copy_pairs := $(foreach m, $(tradefed_dist_artifacts), $(LOCAL_PATH)/../filegroups/tradefed/$(m):$(m))
25
26tradefed_dist_artifacts :=
27
28tradefed_dist_intermediates := $(call intermediates-dir-for,PACKAGING,tradefed_dist,HOST,COMMON)
29tradefed_dist_zip := $(tradefed_dist_intermediates)/tradefed.zip
30$(tradefed_dist_zip) : PRIVATE_COPY_PAIRS := $(tradefed_dist_copy_pairs)
31$(tradefed_dist_zip) : $(SOONG_ZIP) $(foreach f,$(tradefed_dist_copy_pairs),$(call word-colon,1,$(f)))
32 rm -rf $(dir $@)/tmp && mkdir -p $(dir $@)/tmp
33 $(foreach f,$(PRIVATE_COPY_PAIRS), \
34 cp -f $(call word-colon,1,$(f)) $(dir $@)/tmp/$(call word-colon,2,$(f)) &&) true
35 $(SOONG_ZIP) -o $@ -C $(dir $@)/tmp \
36 $(foreach f,$(PRIVATE_COPY_PAIRS),-f $(dir $@)/tmp/$(call word-colon,2,$(f)))
37
38$(call dist-for-goals, tradefed, $(tradefed_dist_zip))
39
40tradefed_dist_copy_pairs :=
41tradefed_dist_intermediates :=
42tradefed_dist_zip :=
43endif
44
45# Build all sub-directories
46include $(call all-makefiles-under,$(LOCAL_PATH))