LoginSignup
2
1

More than 5 years have passed since last update.

Android NDK r8e で ndk-build clean がエラーになる修正

Posted at

はじめに

2013/05/21 にリリースされた Android NDK toolchain r8e の Makefile にバグがあり、ndk-build clean でエラーになります。その問題の解決方法です。

元ネタはこちら。

現象

ndk-build clean を実行すると以下のようなシェルスクリプトのシンタックスエラーが発生する。

Clean: cpufeatures [armeabi-v7a] 
/bin/sh: -c: line 0: syntax error near unexpected token `(' 
/bin/sh: -c: line 0: `rm -rf (TARGET_OBJS)' 
make: *** [clean-cpufeatures-armeabi-v7a] Error 2 

解決方法

android-ndk/build/core/build-binary.mk の 49 行目を変更してください。

-$(cleantarget): PRIVATE_CLEAN_FILES := ($(my)OBJS) 
+$(cleantarget): PRIVATE_CLEAN_FILES := $($(my)OBJS) 

おわりに

現時点での最新版は r9b なのでそちらを利用した方が良いです。
開発環境を変えられないとか、諸事情で r8e を使い続けている方の助けになれば幸いです。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1