diff options
-rw-r--r-- | tools/aapt/Android.mk | 9 | ||||
-rw-r--r-- | tools/aapt/Command.cpp | 18 | ||||
-rw-r--r-- | tools/aapt/Main.cpp | 17 |
3 files changed, 19 insertions, 25 deletions
diff --git a/tools/aapt/Android.mk b/tools/aapt/Android.mk index 0a515db087a1..e74a3dfbb839 100644 --- a/tools/aapt/Android.mk +++ b/tools/aapt/Android.mk @@ -65,8 +65,7 @@ aaptHostStaticLibs := \ libbase \ libz -aaptCFlags := -DAAPT_VERSION=\"$(BUILD_NUMBER_FROM_FILE)\" -aaptCFlags += -Wall -Werror +aaptCFlags := -Wall -Werror # ========================================================== # Build the host static library: libaapt @@ -76,7 +75,6 @@ include $(CLEAR_VARS) LOCAL_MODULE := libaapt LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_CFLAGS := -Wno-format-y2k -DSTATIC_ANDROIDFW_FOR_TOOLS $(aaptCFlags) -LOCAL_CPPFLAGS := $(aaptCppFlags) LOCAL_CFLAGS_darwin := -D_DARWIN_UNLIMITED_STREAMS LOCAL_SRC_FILES := $(aaptSources) LOCAL_STATIC_LIBRARIES := $(aaptHostStaticLibs) @@ -90,8 +88,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := aapt LOCAL_MODULE_HOST_OS := darwin linux windows -LOCAL_CFLAGS := $(aaptCFlags) -LOCAL_CPPFLAGS := $(aaptCppFlags) +LOCAL_CFLAGS := -DAAPT_VERSION=\"$(BUILD_NUMBER_FROM_FILE)\" $(aaptCFlags) LOCAL_SRC_FILES := $(aaptMain) LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs) @@ -105,9 +102,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := libaapt_tests LOCAL_CFLAGS := $(aaptCFlags) -LOCAL_CPPFLAGS := $(aaptCppFlags) LOCAL_SRC_FILES := $(aaptTests) -LOCAL_C_INCLUDES := $(LOCAL_PATH) LOCAL_STATIC_LIBRARIES := libaapt $(aaptHostStaticLibs) include $(BUILD_HOST_NATIVE_TEST) diff --git a/tools/aapt/Command.cpp b/tools/aapt/Command.cpp index ba731801e507..5e8580255197 100644 --- a/tools/aapt/Command.cpp +++ b/tools/aapt/Command.cpp @@ -29,24 +29,6 @@ using namespace android; -#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; -} - - /* * Open the file read only. The call fails if the file doesn't exist. * 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 |