- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
对于从 C 语言源代码构建程序,如果后者是由自动工具以标准方式生成的,则如何指定 makefile 中的规则和规则配方?这意味着在 autoconf、automake 和配置时不进行任何修改。假设没有使用 libtool。 GNU 系统和构建工具。
这两个单独的规则是否一个用于编译另一个用于链接?自动工具到底应用什么形式的配方?
我在automake手册中没有找到这些规范。然而,该手册中很好地指定了其他一些编程语言的规则-目标对。
换句话说,在上面指出的假设下,哪里指定了自动工具生成的 makefile 如何从 C 源代码构建程序?
最佳答案
For building a program from C-language source how are the rules and rule's recipes in makefile specified if latter one is generated by autotools in standard way?
Autotools 旨在实现 GNU 编码标准,因为它们适用于构建系统,如链接所述,in the Automake manual 。编码标准有单独的文档,包括 the standard user-facing targets that Makefiles are expected to provide 。 Automake 提供了这些。
此外,Automake 文档 some targets intended for use as extension points由开发商。 Automake 要么提供这些,要么在开发人员提供的情况下使用它们。
此外,Automake 还为您在 Makefile.am
中明确指定的每个目标提供了一条规则。您可以在非递归构建系统中自由使用这些,但如果您的构建系统是递归的,则 YMMV。
当然,Autotools makefile 包含的目标比这些多得多,但它们的名称应该被视为实现细节。所有规则配方也是实现细节,尽管您可以从 the documentation of the various Automake variables and how they work 中预测其中一些规则的很多内容。 。如果您很好奇,那么查看生成的 Makefile.in
或 Makefile
怎么样?
Are these two separate rules one for compiling another one for linkage?
从使用基于 Autotools 的构建系统构建项目不仅会生成最终目标,还会为每个源文件生成一个目标文件这一事实来看,我们可以确定,至少在当前版本的 Autotools 中,确实存在将源代码编译为目标文件的规则以及将对象链接到可执行文件和/或库的规则。同样,您也可以只查看生成的 Makefile
[.in
]。
Recipes of what form exactly do autotools apply?
具体细节没有记录,原则上,Automake 版本之间可能会有所不同。但同样,您可以从变量中推断出很多信息,并且始终可以生成一个示例来研究。
I haven't found these specifications in automake manual. However rule-target pairs for some other programing languages are pretty well specified in that manual.
AutoMake 手册讨论特定语言的具体规定的主要位置是 in chapter 8, Building Programs and Libraries 。前几节描述了一般情况下以及 Autotools 的标准目标语言 C 的工作原理,然后有几节描述了其他受支持语言的规定。该手册实际上指定了用于 Fortran 77 和 Fortran 95 源代码的构建规则的形式,但不清楚原因。无论如何,这些都是异常(exception)。其他语言没有提供类似的功能。
In other words where is specified how makefiles generated by autotools build programs from C-sources, under assumptions as pointed out above?
C 源代码的构建规则的具体形式没有记录,但从更一般的意义上来说,这是本手册第 2 - 4 章以及第 8 章大部分内容的主题。
关于c - GNU、autotools 的 makefile - 构建 C 语言源代码的规则和方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53048549/
我正在编写一个 Java 应用程序,该应用程序检查网页的源代码,并在满足源代码中的条件时在我的默认浏览器中向我显示该网页。我通过以下方式获取源代码: String source = getUrlSou
数周以来,我一直在为 Android 上的蓝牙项目而苦苦挣扎。有谁知道我可以去哪里查看 Google 用于使其蓝牙配对和连接逻辑正常工作的实际代码? 我浏览了所有的文档、BluetoothChat 应
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 4 年前。
Android 源代码有多个目录,其中包含针对不同设备的代码。此外,在特定目录中,存在显示不同分支和标签的路径。举个例子,在“android/platform/external/iptables”目录
在哪里可以找到 SQLMembershipProvider (.NET2.0) 的源代码? 是可用的么? 最佳答案 源代码已经发布。 See ScottGu's blog for further de
我只想知道如何下载特定版本的 Android 源代码。我已经尝试过以下命令 repo init -u https://android.googlesource.com/platform/manifes
我想看看OpenCL框架是如何实现的。我发现的只是已经编译好的可供下载的库。 当然,OpenCL 可以有许多不同的实现,但我想看看其中的一个来了解它是如何完成的。 为了确保我自己清楚,OpenCL 框
latex 源代码列表应该是什么样子才能产生像已知书籍中那样的输出,例如 Spring 框架的输出?我尝试过使用 latex 列表包,但无法生成看起来像下面一样好的东西。因此,我主要对生成类似以下示例
PHP 是用 C 语言编写的吗?我在哪里可以在线找到 PHP 源代码而无需下载全部内容? 最佳答案 PHP 函数是用 C 编写的 - 您可以在 lxr.php.net 找到可浏览的源代码. 例如:ht
我正在使用Elasticsearch OSS的官方Docker镜像(docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4),似乎完全无法使用s
我试图在Cython中同时编译C和C++源代码。这是我当前的设置: -setup.py from distutils.core import setup from Cython.Build impor
好吧,事情是这样的:你们所有人可能都在想同样的事情:您可以使用 driver.getPageSource(); 这部分是正确的。唯一的问题是源代码以一种相当奇怪的方式编译,所有代码都在其中 \&quo
由于 TwoLineListItem 自 API 17 起已被弃用,因此我已采取措施将其替换为自定义 XML 和 ViewHolder。但是,我真的希望我的应用程序看起来与使用 TwoLineList
要从 HttpURLConnection 获取 InputStream,我们的代码如下 urlConnection.getInputStream(); 如果InputStream是一个Abstract
我刚刚开始学习更多关于 C/C++ 的知识,我正在使用 Visual Studio 2013 来管理代码。 我正在使用 Tobii EyeX 眼睛注视系统的项目要求我能够稍微调整此代码,但是我不明白如
我在按钮上有一个IBAction,其中包含以下代码,我尝试使用它来检索 UIWebView 的源代码: - (IBAction)loadInAWebView:(id)sender { [self
我正在 asp.net 中创建一个网站,我只是想知道有什么方法可以使用 JavaScript 从图像生成调色板吗?类似于 1) http://www.cssdrive.com/imagepalette
有人可以分享 WinKill() from AutoIt 的源代码吗? ? 我想知道它如何处理消息(是/否/取消)以确保它得到正确处理。我想用它来清理桌面上的意外弹出窗口。 最佳答案 正如我们在下面的
我的问题与 Opencv 的源代码有关。在我看来不同的平台the Opencv website提供不同的代码结构。我只是想知道是否有可能为所有不同的平台提供一个源代码。使用相同的源代码,我可以针对不同
这个问题在这里已经有了答案: Convert Python program to C/C++ code? [closed] (8 个答案) 关闭 3 年前。 我一直在努力寻找一种方法将 .py 源文
我是一名优秀的程序员,十分优秀!