blob: 4fdd279c285c4604e24eef05a925d737cdbfc622 [file] [log] [blame]
Joe Onorato964f4012023-05-06 12:29:01 -07001# Copyright (C) 2023 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
Joe Onoratod6df20a2023-06-09 18:51:00 -070015
16# -----------------------------------------------------------------
LaMont Jones052282b2024-05-16 10:46:49 -070017# Determine which pass this is.
18# -----------------------------------------------------------------
19# On the first pass, we are asked for only PRODUCT_RELEASE_CONFIG_MAPS,
20# on the second pass, we are asked for whatever else is wanted.
21_final_product_config_pass:=
22ifneq (PRODUCT_RELEASE_CONFIG_MAPS,$(DUMP_MANY_VARS))
23 _final_product_config_pass:=true
24endif
25
26# -----------------------------------------------------------------
Joe Onoratod6df20a2023-06-09 18:51:00 -070027# Choose the flag files
28# -----------------------------------------------------------------
Joe Onorato1f655512023-06-12 23:29:25 -070029# Release configs are defined in reflease_config_map files, which map
30# the short name (e.g. -next) used in lunch to the starlark files
31# defining the build flag values.
32#
33# (If you're thinking about aconfig flags, there is one build flag,
Joe Onorato6aa48f82023-06-21 15:17:42 -070034# RELEASE_ACONFIG_VALUE_SETS, that sets which aconfig_value_set
Joe Onorato1f655512023-06-12 23:29:25 -070035# module to use to set the aconfig flag values.)
36#
37# The short release config names *can* appear multiple times, to allow
38# for AOSP and vendor specific flags under the same name, but the
39# individual flag values must appear in exactly one config. Vendor
40# does not override AOSP, or anything like that. This is because
41# vendor code usually includes prebuilts, and having vendor compile
42# with different flags from AOSP increases the likelihood of flag
43# mismatch.
44
Joe Onoratod6df20a2023-06-09 18:51:00 -070045# Do this first, because we're going to unset TARGET_RELEASE before
46# including anyone, so they don't start making conditionals based on it.
47# This logic is in make because starlark doesn't understand optional
48# vendor files.
49
50# If this is a google source tree, restrict it to only the one file
51# which has OWNERS control. If it isn't let others define their own.
LaMont Jones91fa4322024-03-29 14:50:50 -070052config_map_files := $(wildcard build/release/release_config_map.mk) \
LaMont Jones318dafe2024-03-07 17:08:05 -080053 $(wildcard vendor/google_shared/build/release/release_config_map.mk) \
Joe Onoratod6df20a2023-06-09 18:51:00 -070054 $(if $(wildcard vendor/google/release/release_config_map.mk), \
55 vendor/google/release/release_config_map.mk, \
56 $(sort \
57 $(wildcard device/*/release/release_config_map.mk) \
58 $(wildcard device/*/*/release/release_config_map.mk) \
59 $(wildcard vendor/*/release/release_config_map.mk) \
60 $(wildcard vendor/*/*/release/release_config_map.mk) \
61 ) \
62 )
63
LaMont Jonesb324a112024-05-30 13:42:25 -070064protobuf_map_files := build/release/release_config_map.textproto \
LaMont Jones20dd4c22024-05-01 11:24:08 -070065 $(wildcard vendor/google_shared/build/release/release_config_map.textproto) \
66 $(if $(wildcard vendor/google/release/release_config_map.textproto), \
67 vendor/google/release/release_config_map.textproto, \
68 $(sort \
69 $(wildcard device/*/release/release_config_map.textproto) \
70 $(wildcard device/*/*/release/release_config_map.textproto) \
71 $(wildcard vendor/*/release/release_config_map.textproto) \
72 $(wildcard vendor/*/*/release/release_config_map.textproto) \
73 ) \
74 )
75
LaMont Jonesb324a112024-05-30 13:42:25 -070076# Remove support for the legacy approach.
77_must_protobuf := true
78
LaMont Jones38b195e2023-11-06 22:14:51 +000079# PRODUCT_RELEASE_CONFIG_MAPS is set by Soong using an initial run of product
80# config to capture only the list of config maps needed by the build.
81# Keep them in the order provided, but remove duplicates.
LaMont Jones20dd4c22024-05-01 11:24:08 -070082# Treat .mk and .textproto as equal for duplicate elimination, but force
83# protobuf if any PRODUCT_RELEASE_CONFIG_MAPS specify .textproto.
LaMont Jones38b195e2023-11-06 22:14:51 +000084$(foreach map,$(PRODUCT_RELEASE_CONFIG_MAPS), \
LaMont Jones20dd4c22024-05-01 11:24:08 -070085 $(if $(filter $(basename $(map)),$(basename $(config_map_files))),, \
86 $(eval config_map_files += $(map))) \
87 $(if $(filter $(basename $(map)).textproto,$(map)),$(eval _must_protobuf := true)) \
LaMont Jones38b195e2023-11-06 22:14:51 +000088)
89
LaMont Jones20dd4c22024-05-01 11:24:08 -070090
91# If we are missing the textproto version of any of $(config_map_files), we cannot use protobuf.
92_can_protobuf := true
93$(foreach map,$(config_map_files), \
94 $(if $(wildcard $(basename $(map)).textproto),,$(eval _can_protobuf :=)) \
95)
96# If we are missing the mk version of any of $(protobuf_map_files), we must use protobuf.
97$(foreach map,$(protobuf_map_files), \
98 $(if $(wildcard $(basename $(map)).mk),,$(eval _must_protobuf := true)) \
99)
100
101ifneq (,$(_must_protobuf))
102 ifeq (,$(_can_protobuf))
LaMont Jones052282b2024-05-16 10:46:49 -0700103 # We must use protobuf, but we cannot use protobuf.
LaMont Jones20dd4c22024-05-01 11:24:08 -0700104 $(error release config is a mixture of .scl and .textproto)
105 endif
106endif
107
108_use_protobuf :=
109ifneq (,$(_must_protobuf))
110 _use_protobuf := true
111else
112 ifneq ($(_can_protobuf),)
113 # Determine the default
114 $(foreach map,$(config_map_files), \
115 $(if $(wildcard $(dir $(map))/build_config/DEFAULT=proto),$(eval _use_protobuf := true)) \
116 $(if $(wildcard $(dir $(map))/build_config/DEFAULT=make),$(eval _use_protobuf := )) \
117 )
118 # Update for this specific release config only (no inheritance).
119 $(foreach map,$(config_map_files), \
120 $(if $(wildcard $(dir $(map))/build_config/$(TARGET_RELEASE)=proto),$(eval _use_protobuf := true)) \
121 $(if $(wildcard $(dir $(map))/build_config/$(TARGET_RELEASE)=make),$(eval _use_protobuf := )) \
122 )
123 endif
124endif
125
126ifneq (,$(_use_protobuf))
127 # The .textproto files are the canonical source of truth.
128 _args := $(foreach map,$(config_map_files), --map $(map) )
129 ifneq (,$(_must_protobuf))
130 # Disable the build flag in release-config.
131 _args += --guard=false
132 endif
LaMont Jones3b9a9352024-05-22 14:40:11 -0700133 _flags_dir:=$(OUT_DIR)/soong/release-config
134 _flags_file:=$(_flags_dir)/release_config-$(TARGET_PRODUCT)-$(TARGET_RELEASE).vars
LaMont Jones052282b2024-05-16 10:46:49 -0700135 # release-config generates $(_flags_varmk)
136 _flags_varmk:=$(_flags_file:.vars=.varmk)
Cole Faust50dc47d2024-05-21 18:16:21 -0700137 $(shell $(OUT_DIR)/release-config $(_args) >$(OUT_DIR)/release-config.out && touch -t 200001010000 $(_flags_varmk))
LaMont Jones20dd4c22024-05-01 11:24:08 -0700138 $(if $(filter-out 0,$(.SHELLSTATUS)),$(error release-config failed to run))
LaMont Jones052282b2024-05-16 10:46:49 -0700139 ifneq (,$(_final_product_config_pass))
140 # Save the final version of the config.
141 $(shell if ! cmp --quiet $(_flags_varmk) $(_flags_file); then cp $(_flags_varmk) $(_flags_file); fi)
Joe Onorato5f141622024-05-30 15:41:07 -0700142 # This will also set ALL_RELEASE_CONFIGS_FOR_PRODUCT and _used_files for us.
LaMont Jones052282b2024-05-16 10:46:49 -0700143 $(eval include $(_flags_file))
144 $(KATI_extra_file_deps $(OUT_DIR)/release-config $(protobuf_map_files) $(_flags_file))
145 else
146 # This is the first pass of product config.
147 $(eval include $(_flags_varmk))
148 endif
149 _used_files :=
LaMont Jones20dd4c22024-05-01 11:24:08 -0700150 ifeq (,$(_must_protobuf)$(RELEASE_BUILD_FLAGS_IN_PROTOBUF))
151 _use_protobuf :=
LaMont Jones3b9a9352024-05-22 14:40:11 -0700152 else
153 _base_all_release := all_release_configs-$(TARGET_PRODUCT)
154 $(call dist-for-goals,droid,\
155 $(_flags_dir)/$(_base_all_release).pb:build_flags/all_release_configs.pb \
156 $(_flags_dir)/$(_base_all_release).textproto:build_flags/all_release_configs.textproto \
157 $(_flags_dir)/$(_base_all_release).json:build_flags/all_release_configs.json \
LaMont Jones52f63ed2024-05-29 14:59:28 -0700158 $(_flags_dir)/inheritance_graph-$(TARGET_PRODUCT).dot:build_flags/inheritance_graph-$(TARGET_PRODUCT).dot \
LaMont Jones3b9a9352024-05-22 14:40:11 -0700159 )
160# These are always created, add an empty rule for them to keep ninja happy.
LaMont Jones52f63ed2024-05-29 14:59:28 -0700161$(_flags_dir)/inheritance_graph-$(TARGET_PRODUCT).dot:
162 : created by $(OUT_DIR)/release-config
LaMont Jones3b9a9352024-05-22 14:40:11 -0700163$(_flags_dir)/$(_base_all_release).pb $(_flags_dir)/$(_base_all_release).textproto $(_flags_dir)/$(_base_all_release).json:
164 : created by $(OUT_DIR)/release-config
165 _base_all_release :=
LaMont Jones20dd4c22024-05-01 11:24:08 -0700166 endif
LaMont Jones3b9a9352024-05-22 14:40:11 -0700167 _flags_dir:=
168 _flags_file:=
169 _flags_varmk:=
LaMont Jones20dd4c22024-05-01 11:24:08 -0700170endif
171ifeq (,$(_use_protobuf))
172 # The .mk files are the canonical source of truth.
173
174
LaMont Jones61b0f792024-01-30 23:04:02 +0000175# Declare an alias release-config
176#
177# This should be used to declare a release as an alias of another, meaning no
178# release config files should be present.
179#
180# $1 config name
181# $2 release config for which it is an alias
182define alias-release-config
183 $(call _declare-release-config,$(1),,$(2),true)
184endef
185
LaMont Jones38b195e2023-11-06 22:14:51 +0000186# Declare or extend a release-config.
187#
LaMont Jones55d5fc52024-01-23 19:15:49 +0000188# The order of processing is:
189# 1. Recursively apply any overridden release configs. Only apply each config
190# the first time we reach it.
191# 2. Apply any files for this release config, in the order they were added to
192# the declaration.
193#
194# Example:
195# With these declarations:
196# $(declare-release-config foo, foo.scl)
197# $(declare-release-config bar, bar.scl, foo)
198# $(declare-release-config baz, baz.scl, bar)
199# $(declare-release-config bif, bif.scl, foo baz)
200# $(declare-release-config bop, bop.scl, bar baz)
201#
202# TARGET_RELEASE:
203# - bar will use: foo.scl bar.scl
204# - baz will use: foo.scl bar.scl baz.scl
205# - bif will use: foo.scl bar.scl baz.scl bif.scl
206# - bop will use: foo.scl bar.scl baz.scl bop.scl
207#
Joe Onoratod6df20a2023-06-09 18:51:00 -0700208# $1 config name
209# $2 release config files
LaMont Jones55d5fc52024-01-23 19:15:49 +0000210# $3 overridden release config
Joe Onoratod6df20a2023-06-09 18:51:00 -0700211define declare-release-config
LaMont Jones61b0f792024-01-30 23:04:02 +0000212 $(call _declare-release-config,$(1),$(2),$(3),)
213endef
214
215define _declare-release-config
LaMont Jones55d5fc52024-01-23 19:15:49 +0000216 $(if $(strip $(2)$(3)),, \
217 $(error declare-release-config: config $(strip $(1)) must have release config files, override another release config, or both) \
Joe Onoratod6df20a2023-06-09 18:51:00 -0700218 )
LaMont Jones61b0f792024-01-30 23:04:02 +0000219 $(if $(strip $(4)),$(eval _all_release_configs.$(strip $(1)).ALIAS := true))
Joe Onorato5f141622024-05-30 15:41:07 -0700220 $(eval ALL_RELEASE_CONFIGS_FOR_PRODUCT := $(sort $(ALL_RELEASE_CONFIGS_FOR_PRODUCT) $(strip $(1))))
LaMont Jonesa6b6e672023-11-27 20:12:36 +0000221 $(if $(strip $(3)), \
Joe Onorato5f141622024-05-30 15:41:07 -0700222 $(if $(filter $(ALL_RELEASE_CONFIGS_FOR_PRODUCT), $(strip $(3))),
LaMont Jonesa6b6e672023-11-27 20:12:36 +0000223 $(if $(filter $(_all_release_configs.$(strip $(1)).OVERRIDES),$(strip $(3))),,
224 $(eval _all_release_configs.$(strip $(1)).OVERRIDES := $(_all_release_configs.$(strip $(1)).OVERRIDES) $(strip $(3)))), \
225 $(error No release config $(strip $(3))) \
226 ) \
227 )
Joe Onorato1f655512023-06-12 23:29:25 -0700228 $(eval _all_release_configs.$(strip $(1)).DECLARED_IN := $(_included) $(_all_release_configs.$(strip $(1)).DECLARED_IN))
229 $(eval _all_release_configs.$(strip $(1)).FILES := $(_all_release_configs.$(strip $(1)).FILES) $(strip $(2)))
Joe Onoratod6df20a2023-06-09 18:51:00 -0700230endef
231
LaMont Jones38b195e2023-11-06 22:14:51 +0000232# Include the config map files and populate _flag_declaration_files.
LaMont Jones451abd62024-03-14 10:48:55 -0700233# If the file is found more than once, only include it the first time.
LaMont Jones38b195e2023-11-06 22:14:51 +0000234_flag_declaration_files :=
LaMont Jones451abd62024-03-14 10:48:55 -0700235_included_config_map_files :=
Joe Onoratod6df20a2023-06-09 18:51:00 -0700236$(foreach f, $(config_map_files), \
LaMont Jones38b195e2023-11-06 22:14:51 +0000237 $(eval FLAG_DECLARATION_FILES:= ) \
LaMont Jones451abd62024-03-14 10:48:55 -0700238 $(if $(filter $(_included_config_map_files),$(f)),,\
239 $(eval _included := $(f)) \
240 $(eval include $(f)) \
241 $(eval _flag_declaration_files += $(FLAG_DECLARATION_FILES)) \
242 $(eval _included_config_map_files += $(f)) \
243 ) \
LaMont Jones38b195e2023-11-06 22:14:51 +0000244)
245FLAG_DECLARATION_FILES :=
246
LaMont Jones76452d82024-03-20 12:24:21 -0700247# Verify that all inherited/overridden release configs are declared.
Joe Onorato5f141622024-05-30 15:41:07 -0700248$(foreach config,$(ALL_RELEASE_CONFIGS_FOR_PRODUCT),\
LaMont Jones76452d82024-03-20 12:24:21 -0700249 $(foreach r,$(all_release_configs.$(r).OVERRIDES),\
250 $(if $(strip $(_all_release_configs.$(r).FILES)$(_all_release_configs.$(r).OVERRIDES)),,\
251 $(error Release config $(config) [declared in: $(_all_release_configs.$(r).DECLARED_IN)] inherits from non-existent $(r).)\
252)))
253# Verify that alias configs do not have config files.
Joe Onorato5f141622024-05-30 15:41:07 -0700254$(foreach r,$(ALL_RELEASE_CONFIGS_FOR_PRODUCT),\
LaMont Jones76452d82024-03-20 12:24:21 -0700255 $(if $(_all_release_configs.$(r).ALIAS),$(if $(_all_release_configs.$(r).FILES),\
256 $(error Alias release config "$(r)" may not specify release config files $(_all_release_configs.$(r).FILES))\
257)))
258
LaMont Jones20dd4c22024-05-01 11:24:08 -0700259# Use makefiles
260endif
261
Greg Kaiser0229ecf2023-11-09 20:28:55 +0000262ifeq ($(TARGET_RELEASE),)
263 # We allow some internal paths to explicitly set TARGET_RELEASE to the
264 # empty string. For the most part, 'make' treats unset and empty string as
265 # the same. But the following line differentiates, and will only assign
266 # if the variable was completely unset.
267 TARGET_RELEASE ?= was_unset
268 ifeq ($(TARGET_RELEASE),was_unset)
Joe Onorato5f141622024-05-30 15:41:07 -0700269 $(error No release config set for target; please set TARGET_RELEASE, or if building on the command line use 'lunch <target>-<release>-<build_type>', where release is one of: $(ALL_RELEASE_CONFIGS_FOR_PRODUCT))
Greg Kaiser0229ecf2023-11-09 20:28:55 +0000270 endif
271 # Instead of leaving this string empty, we want to default to a valid
272 # setting. Full builds coming through this path is a bug, but in case
273 # of such a bug, we want to at least get consistent, valid results.
274 TARGET_RELEASE = trunk_staging
275endif
276
LaMont Jones76452d82024-03-20 12:24:21 -0700277# During pass 1 of product config, using a non-existent release config is not an error.
278# We can safely assume that we are doing pass 1 if DUMP_MANY_VARS=="PRODUCT_RELEASE_CONFIG_MAPS".
LaMont Jones052282b2024-05-16 10:46:49 -0700279ifneq (,$(_final_product_config_pass))
Joe Onorato5f141622024-05-30 15:41:07 -0700280 ifeq ($(filter $(ALL_RELEASE_CONFIGS_FOR_PRODUCT), $(TARGET_RELEASE)),)
281 $(error No release config found for TARGET_RELEASE: $(TARGET_RELEASE). Available releases are: $(ALL_RELEASE_CONFIGS_FOR_PRODUCT))
LaMont Jones76452d82024-03-20 12:24:21 -0700282 endif
Joe Onoratod6df20a2023-06-09 18:51:00 -0700283endif
Greg Kaiser0229ecf2023-11-09 20:28:55 +0000284
LaMont Jones20dd4c22024-05-01 11:24:08 -0700285ifeq (,$(_use_protobuf))
Greg Kaiser0229ecf2023-11-09 20:28:55 +0000286# Choose flag files
287# Don't sort this, use it in the order they gave us.
288# Do allow duplicate entries, retaining only the first usage.
Joe Onoratod6df20a2023-06-09 18:51:00 -0700289flag_value_files :=
LaMont Jones55d5fc52024-01-23 19:15:49 +0000290
291# Apply overrides recursively
292#
293# $1 release config that we override
294applied_releases :=
295define _apply-release-config-overrides
296$(foreach r,$(1), \
297 $(if $(filter $(r),$(applied_releases)),, \
298 $(foreach o,$(_all_release_configs.$(r).OVERRIDES),$(call _apply-release-config-overrides,$(o)))\
299 $(eval applied_releases += $(r))\
LaMont Jonesa6b6e672023-11-27 20:12:36 +0000300 $(foreach f,$(_all_release_configs.$(r).FILES), \
301 $(if $(filter $(f),$(flag_value_files)),,$(eval flag_value_files += $(f)))\
302 )\
LaMont Jones55d5fc52024-01-23 19:15:49 +0000303 )\
Greg Kaiser0229ecf2023-11-09 20:28:55 +0000304)
LaMont Jones55d5fc52024-01-23 19:15:49 +0000305endef
306$(call _apply-release-config-overrides,$(TARGET_RELEASE))
Joe Onoratod6df20a2023-06-09 18:51:00 -0700307# Unset variables so they can't use them
308define declare-release-config
309$(error declare-release-config can only be called from inside release_config_map.mk files)
310endef
LaMont Jones76452d82024-03-20 12:24:21 -0700311define _apply-release-config-overrides
LaMont Jones55d5fc52024-01-23 19:15:49 +0000312$(error invalid use of apply-release-config-overrides)
313endef
Joe Onoratod6df20a2023-06-09 18:51:00 -0700314
LaMont Jones20dd4c22024-05-01 11:24:08 -0700315# use makefiles
316endif
317
Joe Onoratod6df20a2023-06-09 18:51:00 -0700318# TODO: Remove this check after enough people have sourced lunch that we don't
319# need to worry about it trying to do get_build_vars TARGET_RELEASE. Maybe after ~9/2023
320ifneq ($(CALLED_FROM_SETUP),true)
321define TARGET_RELEASE
322$(error TARGET_RELEASE may not be accessed directly. Use individual flags.)
323endef
324else
325TARGET_RELEASE:=
326endif
327.KATI_READONLY := TARGET_RELEASE
328
LaMont Jones20dd4c22024-05-01 11:24:08 -0700329ifeq (,$(_use_protobuf))
Joe Onorato5f141622024-05-30 15:41:07 -0700330$(foreach config, $(ALL_RELEASE_CONFIGS_FOR_PRODUCT), \
Joe Onoratod6df20a2023-06-09 18:51:00 -0700331 $(eval _all_release_configs.$(config).DECLARED_IN:= ) \
332 $(eval _all_release_configs.$(config).FILES:= ) \
333)
LaMont Jones20dd4c22024-05-01 11:24:08 -0700334applied_releases:=
335# use makefiles
336endif
Joe Onoratod6df20a2023-06-09 18:51:00 -0700337config_map_files:=
LaMont Jones20dd4c22024-05-01 11:24:08 -0700338protobuf_map_files:=
Joe Onoratod6df20a2023-06-09 18:51:00 -0700339
340
LaMont Jones20dd4c22024-05-01 11:24:08 -0700341ifeq (,$(_use_protobuf))
Joe Onoratod6df20a2023-06-09 18:51:00 -0700342# -----------------------------------------------------------------
343# Flag declarations and values
344# -----------------------------------------------------------------
345# This part is in starlark. We generate a root starlark file that loads
346# all of the flags declaration files that we found, and the flag_value_files
347# that we chose from the config map above. Then we run that, and load the
348# results of that into the make environment.
349
LaMont Jones38b195e2023-11-06 22:14:51 +0000350# _flag_declaration_files is the combined list of FLAG_DECLARATION_FILES set by
351# release_config_map.mk files above.
Joe Onorato964f4012023-05-06 12:29:01 -0700352
Cole Faust386b3742023-06-06 16:55:58 -0700353# Because starlark can't find files with $(wildcard), write an entrypoint starlark script that
354# contains the result of the above wildcards for the starlark code to use.
355filename_to_starlark=$(subst /,_,$(subst .,_,$(1)))
Cole Faust9a106f32023-11-08 09:51:04 -0800356_c:=load("//build/make/core/release_config.scl", "release_config")
Joe Onoratod6df20a2023-06-09 18:51:00 -0700357_c+=$(newline)def add(d, k, v):
358_c+=$(newline)$(space)d = dict(d)
359_c+=$(newline)$(space)d[k] = v
360_c+=$(newline)$(space)return d
LaMont Jones38b195e2023-11-06 22:14:51 +0000361_c+=$(foreach f,$(_flag_declaration_files),$(newline)load("$(f)", flags_$(call filename_to_starlark,$(f)) = "flags"))
362_c+=$(newline)all_flags = [] $(foreach f,$(_flag_declaration_files),+ [add(x, "declared_in", "$(f)") for x in flags_$(call filename_to_starlark,$(f))])
Joe Onoratod6df20a2023-06-09 18:51:00 -0700363_c+=$(foreach f,$(flag_value_files),$(newline)load("//$(f)", values_$(call filename_to_starlark,$(f)) = "values"))
364_c+=$(newline)all_values = [] $(foreach f,$(flag_value_files),+ [add(x, "set_in", "$(f)") for x in values_$(call filename_to_starlark,$(f))])
365_c+=$(newline)variables_to_export_to_make = release_config(all_flags, all_values)
Cole Faust9a106f32023-11-08 09:51:04 -0800366$(file >$(OUT_DIR)/release_config_entrypoint.scl,$(_c))
Cole Faust386b3742023-06-06 16:55:58 -0700367_c:=
368filename_to_starlark:=
Joe Onorato964f4012023-05-06 12:29:01 -0700369
Cole Faust386b3742023-06-06 16:55:58 -0700370# Exclude the entrypoint file as a dependency (by passing it as the 2nd argument) so that we don't
371# rerun kati every build. Kati will replay the $(file) command that generates it every build,
372# updating its timestamp.
373#
374# We also need to pass --allow_external_entrypoint to rbcrun in case the OUT_DIR is set to something
375# outside of the source tree.
Cole Faust9a106f32023-11-08 09:51:04 -0800376$(call run-starlark,$(OUT_DIR)/release_config_entrypoint.scl,$(OUT_DIR)/release_config_entrypoint.scl,--allow_external_entrypoint)
Joe Onorato7b578d32023-05-19 09:13:36 -0700377
LaMont Jones20dd4c22024-05-01 11:24:08 -0700378# use makefiles
379endif
380_can_protobuf :=
381_must_protobuf :=
382_use_protobuf :=
Joe Onorato5f141622024-05-30 15:41:07 -0700383