aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2016-01-22 18:48:59 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-01-22 18:48:59 +0000
commit5e3aa270e1f94c3eb03e28797cfd622d224d9f94 (patch)
tree1e7301898363f1b469ef81f667689b66db6e9271
parent1ec5e940ed9a07360345b60cbc97ef7a9d2c246d (diff)
parentb137dc9b98e6200ed955ab1290df711a4b2c144a (diff)
downloadplatform_external_libbrillo-5e3aa270e1f94c3eb03e28797cfd622d224d9f94.tar.gz
platform_external_libbrillo-5e3aa270e1f94c3eb03e28797cfd622d224d9f94.tar.bz2
platform_external_libbrillo-5e3aa270e1f94c3eb03e28797cfd622d224d9f94.zip
Set default USE flags values as local variables.
am: b137dc9b98 * commit 'b137dc9b98e6200ed955ab1290df711a4b2c144a': Set default USE flags values as local variables.
-rw-r--r--Android.mk17
1 files changed, 9 insertions, 8 deletions
diff --git a/Android.mk b/Android.mk
index f10575c..0b32d96 100644
--- a/Android.mk
+++ b/Android.mk
@@ -12,9 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Default values for the USE flags. Set these variables in your product .mk
-# file.
-BRILLO_USE_DBUS ?= 1
+# Default values for the USE flags. Override these USE flags from your product
+# by setting BRILLO_USE_* values. Note that we define local variables like
+# local_use_* to prevent leaking our default setting for other packages.
+local_use_dbus := $(if $(BRILLO_USE_DBUS),$(BRILLO_USE_DBUS),1)
LOCAL_PATH := $(call my-dir)
@@ -146,7 +147,7 @@ libbrillo_dbus_test_sources := \
libbrillo_CFLAGS := \
-Wall \
-Werror \
- -DUSE_DBUS=$(BRILLO_USE_DBUS)
+ -DUSE_DBUS=$(local_use_dbus)
libbrillo_CPPFLAGS :=
libbrillo_includes := external/gtest/include
libbrillo_shared_libraries := libchrome
@@ -181,7 +182,7 @@ LOCAL_CLANG := true
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
include $(BUILD_SHARED_LIBRARY)
-ifeq ($(BRILLO_USE_DBUS),1)
+ifeq ($(local_use_dbus),1)
# Shared dbus library for target
# ========================================================
@@ -198,7 +199,7 @@ LOCAL_CLANG := true
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) external/dbus
include $(BUILD_SHARED_LIBRARY)
-endif # BRILLO_USE_DBUS == 1
+endif # local_use_dbus == 1
# Shared minijail library for target
# ========================================================
@@ -360,11 +361,11 @@ LOCAL_STATIC_LIBRARIES := libgtest libchrome_test_helpers \
libbrillo-test-helpers libgmock libBionicGtestMain
LOCAL_SHARED_LIBRARIES := $(libbrillo_shared_libraries) libbrillo libcurl \
libbrillo-http libbrillo-stream libcrypto libprotobuf-cpp-lite
-ifeq ($(BRILLO_USE_DBUS),1)
+ifeq ($(local_use_dbus),1)
LOCAL_SRC_FILES += $(libbrillo_dbus_test_sources)
LOCAL_STATIC_LIBRARIES += libchrome_dbus_test_helpers
LOCAL_SHARED_LIBRARIES += libbrillo-dbus libchrome-dbus libdbus
-endif # BRILLO_USE_DBUS == 1
+endif # local_use_dbus == 1
LOCAL_CFLAGS := $(libbrillo_CFLAGS)
LOCAL_CPPFLAGS := $(libbrillo_CPPFLAGS) -Wno-sign-compare
LOCAL_CLANG := true