Julien Desprez | 9258148 | 2021-02-02 15:53:38 -0800 | [diff] [blame] | 1 | # 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 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | include $(CLEAR_VARS) |
| 17 | |
| 18 | ifeq (,$(wildcard $(LOCAL_PATH)/../../core)) |
| 19 | .PHONY: tradefed-all |
| 20 | tradefed-all: tradefed |
| 21 | |
| 22 | tradefed_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 | |
| 24 | tradefed_dist_copy_pairs := $(foreach m, $(tradefed_dist_artifacts), $(LOCAL_PATH)/../filegroups/tradefed/$(m):$(m)) |
| 25 | |
| 26 | tradefed_dist_artifacts := |
| 27 | |
| 28 | tradefed_dist_intermediates := $(call intermediates-dir-for,PACKAGING,tradefed_dist,HOST,COMMON) |
| 29 | tradefed_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 | |
| 40 | tradefed_dist_copy_pairs := |
| 41 | tradefed_dist_intermediates := |
| 42 | tradefed_dist_zip := |
| 43 | endif |
| 44 | |
| 45 | # Build all sub-directories |
| 46 | include $(call all-makefiles-under,$(LOCAL_PATH)) |