File: variable_location.mk

package info (click to toggle)
android-platform-build-kati 10.0.0%2Br32%2Bgit20220314.09dfa26c4e59-7.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,628 kB
  • sloc: cpp: 10,340; sh: 1,087; python: 85; makefile: 46
file content (42 lines) | stat: -rw-r--r-- 1,253 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
not_traced := no
simple_immediate := \
			a \
			b \
			c
compound_immediate := \
			$(one) \
			d
simple_deferred = e
compound_deferred_1 = $(simple_immediate)
compound_deferred_2 = $(simple_deferred)
overwritten := f
overwritten := g
appened := h
appended += i
eval_macro = evaled := j
$(eval $(eval_macro))
multiple_1 := k
multiple_2 := l

# Standard make doesn't have KATI_variable_location, so the non-kati version
# prints the expected value.
#
# $(1) variable name
# $(2) expected location
define print-location
$(info KATI_variable_location: $(if $(KATI),$(KATI_variable_location $(1)),$(strip $(2))))
endef

$(call print-location, undefined_variable, <unknown>:0)
$(call print-location, not_traced, Makefile:1)
$(call print-location, simple_immediate, Makefile:2)
$(call print-location, compound_immediate, Makefile:6)
$(call print-location, simple_deferred, Makefile:9)
$(call print-location, compound_deferred_1, Makefile:10)
$(call print-location, compound_deferred_2, Makefile:11)
$(call print-location, overwritten, Makefile:13)
$(call print-location, appended, Makefile:15)
$(call print-location, eval_macro, Makefile:16)
$(call print-location, evaled, Makefile:17)
$(call print-location, multiple_1 multiple_2, Makefile:18 Makefile:19)