Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <?xml version="1.0" encoding="UTF-8"?> | |
| 2 <!-- | |
| 3 Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 4 Use of this source code is governed by a BSD-style license that can be | |
| 5 found in the LICENSE file. | |
| 6 --> | |
| 7 <project name="chrome_common_defines"> | |
| 8 <!-- | |
|
nilesh
2012/07/25 16:57:22
<!-- Common build properties for Chrome for androi
Yaron
2012/07/25 18:12:23
Done.
| |
| 9 Common build properties for Chrome for android. | |
| 10 --> | |
| 11 | |
| 12 <!-- Macro for checking that a property is correctly set. | |
|
nilesh
2012/07/25 16:57:22
We should settle on one format for multi-line comm
Yaron
2012/07/25 18:12:23
Done.
| |
| 13 Performs checks for: | |
| 14 1. Property is set and not null. | |
| 15 2. String value of property does not contains any '$' signs. | |
| 16 --> | |
| 17 <macrodef name="check-property-value"> | |
| 18 <attribute name="property" /> | |
| 19 <sequential> | |
| 20 <fail message ="Property @{property} is not set."> | |
| 21 <condition> | |
| 22 <or> | |
| 23 <not> <isset property="@{property}" /> </not> | |
| 24 <length string="${@{property}}" trim="true" when="less" length="1" / > | |
| 25 </or> | |
| 26 </condition> | |
| 27 </fail> | |
| 28 <!-- Check for $ signs. This catches errors when properties are | |
| 29 initialized from environment variables. | |
| 30 E.g. if we have <property name="foo" value="${env.bar}" /> but env.ba r is | |
| 31 not set then foo will have the literal value of '${env.bar}'. | |
| 32 --> | |
|
nilesh
2012/07/25 16:57:22
Match this with <!--
Yaron
2012/07/25 18:12:23
Done.
| |
| 33 <fail message="Value checked failed for property: @{property} : ${@{proper ty}}. | |
| 34 Property value contains an uninitialized environment variable."> | |
| 35 <condition> | |
| 36 <contains string="${@{property}}" substring="$" /> | |
| 37 </condition> | |
|
nilesh
2012/07/25 16:57:22
fix indent.
Yaron
2012/07/25 18:12:23
Done.
| |
| 38 </fail> | |
| 39 </sequential> | |
| 40 </macrodef> | |
| 41 | |
| 42 <!-- A safe setter for location properties. Checks that a location is not | |
| 43 empty and actually exists. For specifying output directories, location | |
| 44 check can be disabled by specifying check-exists ="false" | |
| 45 --> | |
|
nilesh
2012/07/25 16:57:22
This has a different indentation than the comments
Yaron
2012/07/25 18:12:23
Done.
| |
| 46 <macrodef name="property-location"> | |
| 47 <attribute name="name" /> | |
| 48 <attribute name="location" /> | |
| 49 <attribute name="check-exists" default="true" /> | |
| 50 <sequential> | |
| 51 <property name="@{name}" location="@{location}" /> | |
| 52 <check-property-value property="@{name}" /> | |
| 53 <fail message="Location specified for @{name} : @{location} does not exist ."> | |
| 54 <condition> | |
| 55 <and> | |
| 56 <equals arg1="@{check-exists}" arg2="true" /> | |
| 57 <not> <available type="dir" file="@{location}" /> </not> | |
| 58 </and> | |
| 59 </condition> | |
| 60 </fail> | |
| 61 </sequential> | |
| 62 </macrodef> | |
| 63 | |
| 64 <!-- A safe setter for property values --> | |
| 65 <macrodef name="property-value"> | |
| 66 <attribute name="name" /> | |
| 67 <attribute name="value" /> | |
| 68 <sequential> | |
| 69 <property name="@{name}" value="@{value}" /> | |
| 70 <check-property-value property="@{name}" /> | |
| 71 </sequential> | |
| 72 </macrodef> | |
| 73 | |
| 74 | |
| 75 <!-- Common environment properties. --> | |
| 76 | |
| 77 <property environment="env" /> | |
| 78 <property-location name="sdk.dir" location="${env.ANDROID_SDK_ROOT}" /> | |
| 79 <property-location name="toolchain.dir" location="${env.ANDROID_TOOLCHAIN}" /> | |
| 80 <property name="source.dir" location="src" /> | |
| 81 <property-value name="target" value="android-${env.ANDROID_SDK_VERSION}" /> | |
| 82 <property-value name="sdk.version" value="${env.ANDROID_SDK_VERSION}" /> | |
| 83 | |
| 84 <!-- Set path depending on the type of repository. If ANDROID_BUILD_TOP is | |
| 85 set then build using the provided location. Otherwise, assume the build | |
| 86 is using the released SDK and set the path accordingly. --> | |
| 87 <condition property="location.base" | |
| 88 value="${sdk.dir}" | |
| 89 else="${sdk.dir}/platforms/android-${sdk.version}"> | |
| 90 <isset property="env.ANDROID_BUILD_TOP" /> | |
| 91 </condition> | |
| 92 </project> | |
| 93 | |
|
nilesh
2012/07/25 16:57:22
remove trailing new lines.
| |
| 94 | |
| OLD | NEW |