File: shellstatus.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 (23 lines) | stat: -rw-r--r-- 443 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
# Check the value of .SHELLSTATUS before $(shell) has run
A := $(.SHELLSTATUS)

$(shell exit 0)
B := $(.SHELLSTATUS)

$(shell exit 1)
C := $(.SHELLSTATUS)

# .SHELLSTATUS is global across makefiles
$(file >nested.mk,$$(shell exit 2))
include nested.mk
D := $(.SHELLSTATUS)

ruletest: temp := $(shell exit 3)
ruletest: E := $(.SHELLSTATUS)
ruletest:
	@echo $(E)

$(shell exit 0)

test: ruletest
	echo $(A) $(B) $(C) $(D) $(flavor .SHELLSTATUS)