2 # Copyright (C) 2008 The Android Open Source Project
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 # Handle various build version information.
20 # Guarantees that the following are defined:
22 # PLATFORM_SDK_VERSION
27 # Look for an optional file containing overrides of the defaults,
28 # but don't cry if we don't find it. We could just use -include, but
29 # the build.prop target also wants INTERNAL_BUILD_ID_MAKEFILE to be set
32 INTERNAL_BUILD_ID_MAKEFILE := $(wildcard $(BUILD_SYSTEM)/build_id.mk)
33 ifneq "" "$(INTERNAL_BUILD_ID_MAKEFILE)"
34 include $(INTERNAL_BUILD_ID_MAKEFILE)
37 ifeq "" "$(PLATFORM_VERSION)"
38 # This is the canonical definition of the platform version,
39 # which is the version that we reveal to the end user.
40 # Update this value when the platform version changes (rather
41 # than overriding it somewhere else). Can be an arbitrary string.
42 PLATFORM_VERSION := 1.5
45 ifeq "" "$(PLATFORM_SDK_VERSION)"
46 # This is the canonical definition of the SDK version, which defines
47 # the set of APIs and functionality available in the platform. This is
48 # a single integer, that increases monotonically as updates to the SDK
50 PLATFORM_SDK_VERSION := 3
54 # Used to signify special builds. E.g., branches and/or releases,
55 # like "M5-RC7". Can be an arbitrary string, but must be a single
56 # word and a valid file name.
58 # If there is no BUILD_ID set, make it obvious.
62 ifeq "" "$(BUILD_NUMBER)"
63 # BUILD_NUMBER should be set to the source control value that
64 # represents the current state of the source code. E.g., a
65 # perforce changelist number or a git hash. Can be an arbitrary string
66 # (to allow for source control that uses something other than numbers),
67 # but must be a single word and a valid file name.
69 # If no BUILD_NUMBER is set, create a useful "I am an engineering build
70 # from this date/time" value. Make it start with a non-digit so that
71 # anyone trying to parse it as an integer will probably get "0".
72 BUILD_NUMBER := eng.$(USER).$(shell date +%Y%m%d.%H%M%S)