blob: f29e5f6f0daaa912adcbe9dfe39e9fabaa664d61 [file] [log] [blame]
Cole Faust492d6942025-01-08 13:10:11 -08001# Copyright (C) 2025 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
15ifndef KATI
16$(error Only Kati is supported.)
17endif
18
19$(info [1/4] initializing packaging system ...)
20
21.KATI_READONLY := KATI_PACKAGE_MK_DIR
22
23include build/make/common/core.mk
24include build/make/common/strings.mk
25
26# Define well-known goals and their dependency graph that they've
27# traditionally had in make builds. Also it's important to define
28# droid first so that it's built by default.
29
30.PHONY: droid
31droid: droid_targets
32
33.PHONY: droid_targets
Cole Faust68d54332025-01-09 11:33:22 -080034droid_targets: droidcore dist_files
Cole Faust492d6942025-01-08 13:10:11 -080035
36.PHONY: dist_files
37dist_files:
38
Cole Faust68d54332025-01-09 11:33:22 -080039.PHONY: droidcore
40droidcore: droidcore-unbundled
41
42.PHONY: droidcore-unbundled
43droidcore-unbundled:
44
Cole Faust492d6942025-01-08 13:10:11 -080045$(info [2/4] including distdir.mk ...)
46
47include build/make/packaging/distdir.mk
48
49$(info [3/4] defining phony modules ...)
50
51include $(OUT_DIR)/soong/soong_phony_targets.mk
52
53goals := $(sort $(foreach pair,$(DIST_GOAL_OUTPUT_PAIRS),$(call word-colon,1,$(pair))))
Cole Faust492d6942025-01-08 13:10:11 -080054$(foreach goal,$(goals), \
55 $(eval .PHONY: $$(goal)) \
56 $(eval $$(goal):) \
57 $(if $(call streq,$(DIST),true),\
58 $(eval $$(goal): _dist_$$(goal))))
59
60$(info [4/4] writing packaging rules ...)