Re: Run shell command from Android.mk after finished build

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Run shell command from Android.mk after finished build

Boris Davidov
You could make the last fake module with postbuild steps:

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE    := some1
LOCAL_SRC_FILES := some1.c

include $(BUILD_EXECUTABLE)

........ some 2 , some 3....


# this is postbuild step

include $(CLEAR_VARS)

# actually this is the prebuild command for this module, but we use it as prebuild command for other modules
$(shell execute_some_postbuild_command) 

LOCAL_MODULE    := delme
LOCAL_SRC_FILES := delme.c

include $(BUILD_SHARED_LIBRARY)

суббота, 8 января 2011 г., 17:46:01 UTC+7 пользователь rloewe написал:
Hello Johan,

i am searching for this functionality, too.
I tried to define a new target in the Android.mk
and integrate it in the toolchain after the install.

Defining new targets is working (but it creates a Warning).
Still searching for a hook in the toolchain.

Sample:

include $(CLEAR_VARS)

LOCAL_MODULE    := test
LOCAL_SRC_FILES := test.c

print-some-test-information:
        echo "Test worked"

LOCAL_INTERMEDIATE_TARGETS += print-some-test-information

include $(BUILD_SHARED_LIBRARY)

Any other ideas?

Greetings,
Ralph

On Jan 7, 4:28 pm, Johan <[hidden email]> wrote:

> I need to run a shell command from my Android.mk after a static
> library is compiled. My current Android.mk looks like this:
>
> LOCAL_PATH := $(call my-dir)/../../
>
> include $(CLEAR_VARS)
> LOCAL_MODULE := MyLib
> LOCAL_SRC_FILES := MyLib.cpp
> LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
> LOCAL_ARM_MODE := arm
> include $(BUILD_STATIC_LIBRARY)
>
> BUILD_PRODUCTS_DIR := $(call my-dir)/obj/local/$(TARGET_ARCH_ABI)
> $(shell arm-eabi-strip -s $(LOCAL_PATH)/SymbolsToExport.txt $
> (BUILD_PRODUCTS_DIR)/libMyLib.a)
>
> However, this runs the shell command (arm-eabi-strip) *before* the
> library is built. How do I get it to do call a shell command *after*
> the library is built? Bear in mind I'm a makefile n00b.
>
> Thanks for your time!

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/android-ndk/-/3vTl86iyEY4J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.