Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00f3a02b authored by Ying Wang's avatar Ying Wang
Browse files

Improve on unbundled app build

1. build only apps specified in APP-xxx.
2. support building multiple apps in a single make: make APP-Gmail-GmailTests-xxx

Change-Id: I863d3b503a240ae43652e9b18043b60416bcc25a
parent ebd5a9e1
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -692,12 +692,17 @@ droidcore: files \
# on the build variant.
.PHONY: droid tests
ifeq ($(strip $(is_unbundled_app_build)),true)
# We build all modules in the source tree for an unbundled app build.
unbundled_build_modules :=
ifdef UNBUNDLED_APPS
unbundled_build_modules := $(UNBUNDLED_APPS)
else # UNBUNDLED_APPS
# Otherwise we build all modules in the source tree.
unbundled_build_modules := $(sort $(call get-tagged-modules,$(ALL_MODULE_TAGS)))
endif # UNBUNDLED_APPS
droid: $(unbundled_build_modules)
else
else # is_unbundled_app_build
droid: droidcore
endif
endif # is_unbundled_app_build
tests: droidcore

# Dist for droid if droid is among the cmd goals, or no cmd goal is given.
@@ -736,11 +741,11 @@ endif # tests

else # is_unbundled_app_build
# dist the unbundled app.
ifdef UNBUNDLED_APP
ifdef UNBUNDLED_APPS
  $(call dist-for-goals,droid, \
    $(ALL_MODULES.$(UNBUNDLED_APP).INSTALLED) \
    $(foreach m,$(UNBUNDLED_APPS),$(ALL_MODULES.$(m).INSTALLED)) \
  )
endif # UNBUNDLED_APP
endif # UNBUNDLED_APPS
endif # is_unbundled_app_build
endif  # droid in $(MAKECMDGOALS)

+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ ifdef unbundled_goals
  ifneq ($(words $(unbundled_goals)),1)
    $(error Only one APP-* goal may be specified; saw "$(unbundled_goals)"))
  endif
  UNBUNDLED_APP := $(patsubst APP-%,%,$(unbundled_goals))
  UNBUNDLED_APPS := $(strip $(subst -, ,$(patsubst APP-%,%,$(unbundled_goals))))
  ifneq ($(filter $(DEFAULT_GOAL),$(MAKECMDGOALS)),)
    MAKECMDGOALS := $(patsubst $(unbundled_goals),,$(MAKECMDGOALS))
  else