14d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# Copyright (C) 2017 Google Inc. 24d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# 34d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# Licensed under the Apache License, Version 2.0 (the "License"); 44d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# you may not use this file except in compliance with the License. 54d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# You may obtain a copy of the License at 64d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# 74d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# http://www.apache.org/licenses/LICENSE-2.0 84d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# 94d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# Unless required by applicable law or agreed to in writing, software 104d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# distributed under the License is distributed on an "AS IS" BASIS, 114d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 124d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# See the License for the specific language governing permissions and 134d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# limitations under the License. 144d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes 154d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# We rewrite ${PLATFORM_SDK_VERSION} with 0 rather than $(PLATFORM_SDK_VERSION) 164d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# because on the actual platform tools release branches the file contains a 174d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes# literal instead. Using 0 lets us easily distinguish non-canonical builds. 184d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughesplatform_tools_version := $(shell sed \ 194d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes 's/$${PLATFORM_SDK_VERSION}/0/ ; s/^Pkg.Revision=\(.*\)/\1/p ; d' \ 20ac98aac43f0c8c4f74698ecc8bcd7a2d8a77ccd0Dan Willemsen development/sdk/plat_tools_source.prop_template \ 214d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughes ) 224d4f64ff94e8c03d0c2e7b7ccfa7c48ca2345087Elliott Hughestool_version := $(platform_tools_version)-$(BUILD_NUMBER_FROM_FILE) 23