-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlocalvar.mk
executable file
·163 lines (143 loc) · 4.11 KB
/
localvar.mk
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#
# Currenly the following local variables are used for
# each product to define the behavior for porting
# local-zip-file MUST be defined
# local-out-zip-file
# local-modified-apps
# local-modified-jars
# local-lewa-removed-apps
# local-lewa-apps (DEPRECATED)
# local-lewa-modified-apps
# local-lewa-device
# local-lewa-partner
# local-phone-apps
# local-remove-apps
# local-pre-zip
# local-after-zip
# local-density (HDPI or XHDPI)
# See m1s/makefile as an example
#
include $(PORT_ROOT)/build/$(PATCHROM_BRANCH).mk
ERR_REPORT :=
VERIFY_OTA :=
ZIP_FILE := $(strip $(local-zip-file))
ifeq ($(ZIP_FILE),)
ERR_REPORT += error-no-zipfile
endif
OUT_ZIP_FILE := $(strip $(local-out-zip-file))
ifeq ($(OUT_ZIP_FILE),)
OUT_ZIP_FILE:= update.zip
endif
APPS := $(strip $(local-modified-apps))
ALL_LEWAAPPS := $(strip $(private-lewa-apps))
LEWAAPPS_MOD := $(strip $(local-lewa-modified-apps))
LEWAAPPS := $(strip \
$(filter-out $(strip $(local-lewa-modified-apps)), \
$(filter-out $(strip $(local-lewa-removed-apps)),$(strip $(private-lewa-apps)))) \
)
LEWA_JARS := $(strip $(local-lewa-jars))
ifeq ($(LEWA_JARS),)
LEWA_JARS := $(strip $(private-lewa-jars))
endif
# specify the density for apps, HDPI OR XHDPI, default is XHDPI
DENSITY := $(strip $(local-density))
ifeq ($(DENSITY),)
DENSITY := XHDPI
endif
ACT_PRE_ZIP := $(strip $(local-pre-zip))
ACT_PRE_ZIP += pre-zip-misc
ifeq ($(strip $(local-rewrite-skia-lib)),false)
REWRITE_SKIA_LIB := false
else
REWRITE_SKIA_LIB := true
endif
# if local-phone-apps is set, local-remove-apps would not be used,
# and the apps could be removed at target $(ZIP_DIR)
ifeq ($(strip $(local-phone-apps)),)
RUNDAPKS := $(strip $(local-remove-apps))
ifneq ($(RUNDAPKS),)
ACT_PRE_ZIP += remove-rund-apks
endif
else
local-remove-apps :=
RUNDAPKS :=
endif
ACT_PRE_ZIP += $(VERIFY_OTA)
ACT_AFTER_ZIP := $(strip $(local-after-zip))
ifeq ($(strip $(USE_ANDROID_OUT)),true)
ifeq ($(ANDROID_OUT),)
ERR_REPORT += error-android-env
else
OUT_SYS_PATH := $(ANDROID_OUT)/system
OUT_DATA_PATH := $(ANDROID_OUT)/data
REALLY_CLEAN = $(CLEANJAR) $(CLEANLEWAAPP)
endif
else
USE_ANDROID_OUT := false
OUT_SYS_PATH := $(PORT_ROOT)/lewa/$(DENSITY)/system
OUT_DATA_PATH := $(PORT_ROOT)/lewa/data
REALLY_CLEAN :=
endif
PHONE_JARS := $(strip $(local-modified-jars))
OUT_JAR_PATH := $(OUT_SYS_PATH)/framework
OUT_APK_PATH := $(OUT_SYS_PATH)/app
OUT_PREINSTALL_APK_PATH := $(OUT_DATA_PATH)/media/preinstall_apps
#
# log could be set with 'make -e log=value target' and the value:
# quiet : print information about the make stage and the scripts
# info : print more information related to the running scripts
# verbose: print all information from executed commands
# and the default value is 'info'
log := info
PROG :=
APK_VERBOSE := --verbose
ifeq ($(strip $(log)),verbose)
INFO :=
VERBOSE :=
else
VERBOSE := >/dev/null
APK_VERBOSE := --quiet
ifeq ($(strip $(log)),quiet)
INFO := >/dev/null
endif
endif
# use 'make -e showcommand=true' to print all executed commands, if not
# set, only the scripts are printed. To disable all commands (including
# those scripts), use 'make -s'
ifeq ($(strip $(showcommand)),true)
hide :=
else
hide := @
endif
# variable for local-ota
ifeq ($(strip $(otabase)),)
OTA_BASE := $(shell adb shell getprop ro.build.version.incremental 2>/dev/null | tail -n 1 | sed -e "s/0.\.//" | sed -e "s/://g")
else
OTA_BASE := $(strip $(otabase))
endif
ifeq ($(strip $(otatype)),fullota)
OTA_TYPE := fullota
else
OTA_TYPE := zipfile
endif
ifeq ($(strip $(OTA_BASE)),)
OTA_BASE :=unknown
endif
ifeq ($(strip $(include_thirdpart_app)),true)
INCLUDE_THIRDPART_APP := true
else
INCLUDE_THIRDPART_APP := false
endif
PARTNER := $(strip $(local-lewa-partner))
ifeq ($(PARTNER),)
PARTNER := Lewa
endif
ifeq ($(strip $(PORT_PRODUCT)),Unknown)
ifneq ($(strip $(local-lewa-device)),)
PORT_PRODUCT := $(strip $(local-lewa-device))
endif
endif
OTA_ASSERT_DEVICE := $(strip $(local-ota-assert-device))
ifeq ($(OTA_ASSERT_DEVICE),)
OTA_ASSERT_DEVICE := auto
endif