i build and run TestCpp ok, but clean faild, anybody can help me? "recipe for target `clean-box2d_static-armeabi' failed"

17:20:51 * Clean-only build of configuration Default for project TestCpp*
bash “D:cocos2d-2.1rc0-x-2.1.2samplesCppTestCppproj.android/build_native.sh” NDK_DEBUG=1 v=1 e=1 ~~j4 clean
cygwin warning:
MS-DOS style path detected: D:2d-2.1rc0-x-2.1.2\samples\Cpp\TestCpp\proj.android
Preferred POSIX equivalent is: /cygdrive/d/cocos2d-2.1rc0-x-2.1.2/samples/Cpp/TestCpp/proj.android
CYGWIN environment variable option “nodosfilewarning” turns off this warning.
Consult the user’s guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
NDK_ROOT = /cygdrive/d/android-ndk-r8e/
COCOS2DX_ROOT = /cygdrive/d/cocos2d-2.1rc0-x-2.1.2/
APP_ROOT = /cygdrive/d/cocos2d-2.1rc0-x-2.1.2/samples/Cpp/TestCpp/
APP_ANDROID_ROOT = /cygdrive/d/cocos2d-2.1rc0-x-2.1.2/samples/Cpp/TestCpp/proj.android/
Using prebuilt externals
make: Entering directory `/cygdrive/d/cocos2d-2.1rc0-x-2.1.2/samples/Cpp/TestCpp/proj.android’
Clean: box2d_static
Clean: chipmunk_static
/bin/sh:~~c: line 0: syntax error near unexpected token `(‘
/bin/sh: c: line 0: `rmrf (TARGET_OBJS)’
/cygdrive/d/android-ndk-r8e/build/core/build-binary.mk:52: recipe for target `clean-box2d_static-armeabi’ failed
make: * Error 1
Clean: cocos2dx_static
/cygdrive/d/android-ndk-r8e/build/core/build-binary.mk:52: recipe for target `clean-chipmunk_static-armeabi’ failed
make:
* Waiting for unfinished jobs….
/bin/sh: -c: line 0: syntax error near unexpected token `(‘
/cygdrive/d/android-ndk-r8e/build/core/build-binary.mk:52: recipe for target `clean-cocos2dx_static-armeabi’ failed
/bin/sh: c: line 0: `rmrf (TARGET_OBJS)’
make: * Error 1
make: Leaving directory `/cygdrive/d/cocos2d-2.1rc0-x-2.1.2/samples/Cpp/TestCpp/proj.android’
/bin/sh: -c: line 0: syntax error near unexpected token `’
make:
* [clean-cocos2dx_static-armeabi] Error 1

17:20:59 Build Finished (took 7s.413ms)

(!) (!)

It seems that a dollar sign is missing, so that the shell is confused and ‘TARGET_OBJS’ cannot get resolved.
It should be `rm rf ${TARGET_OBJS}’ or just `rmrf $TARGET_OBJS’.

/miro/

El Miro wrote:

It seems that a dollar sign is missing, so that the shell is confused and ‘TARGET_OBJS’ cannot get resolved.
It should be `rm rf ${TARGET_OBJS}’ or just `rmrf $TARGET_OBJS’.
>
/miro/
but i do not know where missing, the log does not tell me, how i can find it

Sorry, but I cannot tell you where this ‘rm’ command can be found, because I do not have any setup for Android.
You can try to find it by yourself using the grep command, for instance.

Try something like:
grep -ir ‘rm -rf (TARGET_OBJS)’ *

…in one of the following directories:
/cygdrive/d/cocos2d-2.1rc0-x-2.1.2/samples/Cpp/TestCpp/proj.android
/cygdrive/d/android-ndk-r8e/build/

…or maybe its already here:
/cygdrive/d/android-ndk-r8e/build/core/build-binary.mk

…or some other script is calling ‘build-binary.mk’ with ‘(TARGET_OBJS)’, instead of ‘$(TARGET_OBJS)’.

/miro/

This is a bug in the Android NDK

Bug is how to fix

S. Fujii wrote:

This is a bug in the Android NDK
>
Bug is how to fix
http://developer.appcelerator.com/blog/2013/03/correcting-a-bug-in-the-latest-google-ndk-r8e.html

Thanks! This solution works fine!