Move some configuration from main.mk to config.mk am: 01a19a116f
am: 0a2b2784a6
Change-Id: Ifae685fa3de7f418dd1d4a2060c6637fac2b670d
This commit is contained in:
commit
cc54ba0452
|
@ -31,6 +31,37 @@ endef
|
||||||
backslash := \a
|
backslash := \a
|
||||||
backslash := $(patsubst %a,%,$(backslash))
|
backslash := $(patsubst %a,%,$(backslash))
|
||||||
|
|
||||||
|
# this turns off the suffix rules built into make
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
# this turns off the RCS / SCCS implicit rules of GNU Make
|
||||||
|
% : RCS/%,v
|
||||||
|
% : RCS/%
|
||||||
|
% : %,v
|
||||||
|
% : s.%
|
||||||
|
% : SCCS/s.%
|
||||||
|
|
||||||
|
# If a rule fails, delete $@.
|
||||||
|
.DELETE_ON_ERROR:
|
||||||
|
|
||||||
|
# Check for broken versions of make.
|
||||||
|
ifndef KATI
|
||||||
|
ifneq (1,$(strip $(shell expr $(MAKE_VERSION) \>= 3.81)))
|
||||||
|
$(warning ********************************************************************************)
|
||||||
|
$(warning * You are using version $(MAKE_VERSION) of make.)
|
||||||
|
$(warning * Android can only be built by versions 3.81 and higher.)
|
||||||
|
$(warning * see https://source.android.com/source/download.html)
|
||||||
|
$(warning ********************************************************************************)
|
||||||
|
$(error stopping)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Used to force goals to build. Only use for conditionally defined goals.
|
||||||
|
.PHONY: FORCE
|
||||||
|
FORCE:
|
||||||
|
|
||||||
|
ORIGINAL_MAKECMDGOALS := $(MAKECMDGOALS)
|
||||||
|
|
||||||
# Tell python not to spam the source tree with .pyc files. This
|
# Tell python not to spam the source tree with .pyc files. This
|
||||||
# only has an effect on python 2.6 and above.
|
# only has an effect on python 2.6 and above.
|
||||||
export PYTHONDONTWRITEBYTECODE := 1
|
export PYTHONDONTWRITEBYTECODE := 1
|
||||||
|
@ -811,4 +842,21 @@ define find_warning_allowed_projects
|
||||||
$(filter $(ANDROID_WARNING_ALLOWED_PROJECTS),$(1)/)
|
$(filter $(ANDROID_WARNING_ALLOWED_PROJECTS),$(1)/)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
# These goals don't need to collect and include Android.mks/CleanSpec.mks
|
||||||
|
# in the source tree.
|
||||||
|
dont_bother_goals := clean clobber dataclean installclean \
|
||||||
|
help out \
|
||||||
|
snod systemimage-nodeps \
|
||||||
|
stnod systemtarball-nodeps \
|
||||||
|
userdataimage-nodeps userdatatarball-nodeps \
|
||||||
|
cacheimage-nodeps \
|
||||||
|
bptimage-nodeps \
|
||||||
|
vendorimage-nodeps \
|
||||||
|
systemotherimage-nodeps \
|
||||||
|
ramdisk-nodeps \
|
||||||
|
bootimage-nodeps \
|
||||||
|
recoveryimage-nodeps \
|
||||||
|
vbmetaimage-nodeps \
|
||||||
|
product-graph dump-products
|
||||||
|
|
||||||
include $(BUILD_SYSTEM)/dumpvar.mk
|
include $(BUILD_SYSTEM)/dumpvar.mk
|
||||||
|
|
69
core/main.mk
69
core/main.mk
|
@ -9,44 +9,6 @@ else
|
||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# this turns off the suffix rules built into make
|
|
||||||
.SUFFIXES:
|
|
||||||
|
|
||||||
# this turns off the RCS / SCCS implicit rules of GNU Make
|
|
||||||
% : RCS/%,v
|
|
||||||
% : RCS/%
|
|
||||||
% : %,v
|
|
||||||
% : s.%
|
|
||||||
% : SCCS/s.%
|
|
||||||
|
|
||||||
# If a rule fails, delete $@.
|
|
||||||
.DELETE_ON_ERROR:
|
|
||||||
|
|
||||||
# Figure out where we are.
|
|
||||||
#TOP := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
|
|
||||||
#TOP := $(patsubst %/,%,$(TOP))
|
|
||||||
|
|
||||||
# TOPDIR is the normal variable you should use, because
|
|
||||||
# if we are executing relative to the current directory
|
|
||||||
# it can be "", whereas TOP must be "." which causes
|
|
||||||
# pattern matching problems when make strips off the
|
|
||||||
# trailing "./" from paths in various places.
|
|
||||||
#ifeq ($(TOP),.)
|
|
||||||
#TOPDIR :=
|
|
||||||
#else
|
|
||||||
#TOPDIR := $(TOP)/
|
|
||||||
#endif
|
|
||||||
|
|
||||||
# Check for broken versions of make.
|
|
||||||
ifneq (1,$(strip $(shell expr $(MAKE_VERSION) \>= 3.81)))
|
|
||||||
$(warning ********************************************************************************)
|
|
||||||
$(warning * You are using version $(MAKE_VERSION) of make.)
|
|
||||||
$(warning * Android can only be built by versions 3.81 and higher.)
|
|
||||||
$(warning * see https://source.android.com/source/download.html)
|
|
||||||
$(warning ********************************************************************************)
|
|
||||||
$(error stopping)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Absolute path of the present working direcotry.
|
# Absolute path of the present working direcotry.
|
||||||
# This overrides the shell variable $PWD, which does not necessarily points to
|
# This overrides the shell variable $PWD, which does not necessarily points to
|
||||||
# the top of the source tree, for example when "make -C" is used in m/mm/mmm.
|
# the top of the source tree, for example when "make -C" is used in m/mm/mmm.
|
||||||
|
@ -65,33 +27,6 @@ $(DEFAULT_GOAL): droid_targets
|
||||||
.PHONY: droid_targets
|
.PHONY: droid_targets
|
||||||
droid_targets:
|
droid_targets:
|
||||||
|
|
||||||
# Used to force goals to build. Only use for conditionally defined goals.
|
|
||||||
.PHONY: FORCE
|
|
||||||
FORCE:
|
|
||||||
|
|
||||||
# These goals don't need to collect and include Android.mks/CleanSpec.mks
|
|
||||||
# in the source tree.
|
|
||||||
dont_bother_goals := clean clobber dataclean installclean \
|
|
||||||
help out \
|
|
||||||
snod systemimage-nodeps \
|
|
||||||
stnod systemtarball-nodeps \
|
|
||||||
userdataimage-nodeps userdatatarball-nodeps \
|
|
||||||
cacheimage-nodeps \
|
|
||||||
bptimage-nodeps \
|
|
||||||
vendorimage-nodeps \
|
|
||||||
systemotherimage-nodeps \
|
|
||||||
ramdisk-nodeps \
|
|
||||||
bootimage-nodeps \
|
|
||||||
recoveryimage-nodeps \
|
|
||||||
vbmetaimage-nodeps \
|
|
||||||
product-graph dump-products
|
|
||||||
|
|
||||||
ifneq ($(filter $(dont_bother_goals), $(MAKECMDGOALS)),)
|
|
||||||
dont_bother := true
|
|
||||||
endif
|
|
||||||
|
|
||||||
ORIGINAL_MAKECMDGOALS := $(MAKECMDGOALS)
|
|
||||||
|
|
||||||
# Targets that provide quick help on the build system.
|
# Targets that provide quick help on the build system.
|
||||||
include $(BUILD_SYSTEM)/help.mk
|
include $(BUILD_SYSTEM)/help.mk
|
||||||
|
|
||||||
|
@ -109,6 +44,10 @@ $(shell mkdir -p $(OUT_DIR) && touch $(OUT_DIR)/ninja_build)
|
||||||
include build/core/ninja.mk
|
include build/core/ninja.mk
|
||||||
else # KATI
|
else # KATI
|
||||||
|
|
||||||
|
ifneq ($(filter $(dont_bother_goals), $(MAKECMDGOALS)),)
|
||||||
|
dont_bother := true
|
||||||
|
endif
|
||||||
|
|
||||||
include $(SOONG_MAKEVARS_MK)
|
include $(SOONG_MAKEVARS_MK)
|
||||||
|
|
||||||
# Write the build number to a file so it can be read back in
|
# Write the build number to a file so it can be read back in
|
||||||
|
|
Loading…
Reference in New Issue