*这个问题是关于从ndk-build*调用make跟踪选项的。
我试图通过一个make文件进行跟踪,但是我得到了一个错误。据我理解,ndk是shell,它调用make。因此,我应该能够调用make开关,并且可以执行其中的一些操作。但是跟踪选项不起作用:-(请看下面的输出,我做错了什么?
@Mad科学家--我下载并输入了4.0版。但我还是看到了同样的错误。有人能在他们的系统上运行它,并发布他们使用的命令吗?我想我可能是在触发开关坏掉什么的。如果我能看到一个工作实例,我可以从那里微调命令。另外,我看了一下您发布的make-4.0更新链接,也列出了调试。因此,我不知道为什么或如何调试3.81;也许是早期版本的。此外,我也不知道为什么调试工作,但不跟踪。我认为这是ndk的问题。我所做的是直接发布make,不仅我看到跟踪工作,而且我没有看到促使我发布这个问题的错误。这是一种投诉,所有这些都与":“和”:“连用。我将在这篇文章上贴上ndk标签,希望有ndk专业知识的人加入进来。我非常感谢你的帮助。
sansari@ubuntu:~/AndroidStudioProjects/ThirdNDK/app/src/main$ make -version
GNU Make 4.0
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
sansari@ubuntu:~/AndroidStudioProjects/ThirdNDK/app/src/main$ ~/ndk/android-ndk-r10d/ndk-build --trace -I /home/sansari/mytree2/TBT --just-print
/home/sansari/ndk/android-ndk-r10d/prebuilt/linux-x86_64/bin/make: unrecognized option '--trace'
Usage: make [options] [target] ...
Options:
-b, -m Ignored for compatibility.
-B, --always-make Unconditionally make all targets.
-C DIRECTORY, --directory=DIRECTORY
Change to DIRECTORY before doing anything.
-d Print lots of debugging information.
--debug[=FLAGS] Print various types of debugging information.
-e, --environment-overrides
Environment variables override makefiles.
-f FILE, --file=FILE, --makefile=FILE
Read FILE as a makefile.
-h, --help Print this message and exit.
-i, --ignore-errors Ignore errors from commands.
-I DIRECTORY, --include-dir=DIRECTORY
Search DIRECTORY for included makefiles.
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-k, --keep-going Keep going when some targets can't be made.
-l [N], --load-average[=N], --max-load[=N]
Don't start multiple jobs unless load is below N.
-L, --check-symlink-times Use the latest mtime between symlinks and target.
-n, --just-print, --dry-run, --recon
Don't actually run any commands; just print them.
-o FILE, --old-file=FILE, --assume-old=FILE
Consider FILE to be very old and don't remake it.
-p, --print-data-base Print make's internal database.
-q, --question Run no commands; exit status says if up to date.
-r, --no-builtin-rules Disable the built-in implicit rules.
-R, --no-builtin-variables Disable the built-in variable settings.
-s, --silent, --quiet Don't echo commands.
-S, --no-keep-going, --stop
Turns off -k.
-t, --touch Touch targets instead of remaking them.
-v, --version Print the version number of make and exit.
-w, --print-directory Print the current directory.
--no-print-directory Turn off -w, even if it was turned on implicitly.
-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
Consider FILE to be infinitely new.
--warn-undefined-variables Warn when an undefined variable is referenced.
This program built for x86_64-pc-linux-gnu
Report bugs to <bug-make@gnu.org>
sansari@ubuntu:~/AndroidStudioProjects/ThirdNDK/app/src/main$ @亚历克斯·科恩-再次感谢。这解释了很多。我将首先研究获得最新的ndk,然后尝试使用最新版本的make。对我来说,一个突出的问题是,我的本地C项目(我正试图移植到jni中)使用早期版本的ndk中的一个工具链进行编译。因此,对于我来说,获得"::“错误消息现在似乎表明它是由其他原因引起的。我怀疑这与我试图将C项目的make文件包含到我的Android.mk中有关。虽然我的Android.mk没有一个全部的目标,但是否有一个暗示呢?我只是像报纸一样读了一次“制作手册”,我不记得是否是这样。但是有很多隐含的规则。你对此有什么想法吗?
发布于 2015-03-28 22:11:39
谷歌在ndk包中使用了GNU的自定义版本。您可以尝试使用下载的make启动ndk-build。
GNUMAKE=`which make` ndk-build但是,.mk文件(构成ndk的核心)和路径上的make之间可能存在一些微小的不一致。
发布于 2015-03-28 18:09:00
很可能您使用的是GNU的旧版本。GNU中的--trace标志加进使版本为4.0。
https://stackoverflow.com/questions/29320349
复制相似问题