Cole Faust | 492d694 | 2025-01-08 13:10:11 -0800 | [diff] [blame] | 1 | # 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 | |
| 15 | ifndef KATI |
| 16 | $(error Only Kati is supported.) |
| 17 | endif |
| 18 | |
| 19 | $(info [1/4] initializing packaging system ...) |
| 20 | |
| 21 | .KATI_READONLY := KATI_PACKAGE_MK_DIR |
| 22 | |
| 23 | include build/make/common/core.mk |
| 24 | include 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 |
| 31 | droid: droid_targets |
| 32 | |
| 33 | .PHONY: droid_targets |
Cole Faust | 68d5433 | 2025-01-09 11:33:22 -0800 | [diff] [blame] | 34 | droid_targets: droidcore dist_files |
Cole Faust | 492d694 | 2025-01-08 13:10:11 -0800 | [diff] [blame] | 35 | |
| 36 | .PHONY: dist_files |
| 37 | dist_files: |
| 38 | |
Cole Faust | 68d5433 | 2025-01-09 11:33:22 -0800 | [diff] [blame] | 39 | .PHONY: droidcore |
| 40 | droidcore: droidcore-unbundled |
| 41 | |
| 42 | .PHONY: droidcore-unbundled |
| 43 | droidcore-unbundled: |
| 44 | |
Cole Faust | 492d694 | 2025-01-08 13:10:11 -0800 | [diff] [blame] | 45 | $(info [2/4] including distdir.mk ...) |
| 46 | |
| 47 | include build/make/packaging/distdir.mk |
| 48 | |
| 49 | $(info [3/4] defining phony modules ...) |
| 50 | |
| 51 | include $(OUT_DIR)/soong/soong_phony_targets.mk |
| 52 | |
| 53 | goals := $(sort $(foreach pair,$(DIST_GOAL_OUTPUT_PAIRS),$(call word-colon,1,$(pair)))) |
Cole Faust | 492d694 | 2025-01-08 13:10:11 -0800 | [diff] [blame] | 54 | $(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 ...) |