From 896f01879b424e4f37e65bcf546dc9d5cd712e25 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Fri, 8 Sep 2017 22:02:41 -0700 Subject: Don't compile libaapt with the build number Only do that for the aapt binary itself. This will allow libaapt to be converted to Soong. Also remove a few lines that weren't doing anything: aaptCppflags was never set, LOCAL_C_INCLUDES := $(LOCAL_PATH) is implied. Test: m aapt Test: aapt version Change-Id: Ia3bcece14921417e1bfd3406630961c013bd497c --- tools/aapt/Main.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tools/aapt/Main.cpp') diff --git a/tools/aapt/Main.cpp b/tools/aapt/Main.cpp index 417b7ae087e1..d714687ee914 100644 --- a/tools/aapt/Main.cpp +++ b/tools/aapt/Main.cpp @@ -20,6 +20,23 @@ using namespace android; static const char* gProgName = "aapt"; +#ifndef AAPT_VERSION + #define AAPT_VERSION "" +#endif + +/* + * Show version info. All the cool kids do it. + */ +int doVersion(Bundle* bundle) +{ + if (bundle->getFileSpecCount() != 0) { + printf("(ignoring extra arguments)\n"); + } + printf("Android Asset Packaging Tool, v0.2-" AAPT_VERSION "\n"); + + return 0; +} + /* * When running under Cygwin on Windows, this will convert slash-based * paths into back-slash-based ones. Otherwise the ApptAssets file comparisons -- cgit v1.2.3-59-g8ed1b