“make check”是什么意思?做?

发布于 2024-08-11 04:27:04 字数 145 浏览 3 评论 0原文

我想知道在configuremakemake checkmake install的安装过程中,是做什么的make check 做什么?谢谢!

I wonder in the installation process of configure, make, make check and make install, what does make check do? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

沧笙踏歌 2024-08-18 04:27:04

严格来说,它并不一定有什么作用。

如果 Makefile 有一个名为 check 的目标,那么 make check 将“构建”该目标。它通常是一个虚假目标,这意味着它是一个 make 脚本命令,而不是创建的名为“check”的文件。

gnu 项目建议所有 GNU 软件应包含一组 20 个标准目标(来源:https://www.gnu.org/software/make/manual/html_node/Standard-Targets.html)。

check 目标(通过输入 make check 运行)是这些标准目标之一,在上面的源代码中定义为:

检查 执行自检(如果有)。用户必须在运行测试之前构建程序,但不需要安装程序;您应该编写自测试,以便它们在程序构建但未安装时工作。

其他项目(不属于 GNU 的一部分)有时也会遵循此约定,或者至少实现这些目标的子集。

Strictly speaking, it doesn't necessarily do anything.

If a Makefile has a target named check, then make check will "build" that target. It's typically a phony target, meaning that it is a make-scripted command rather than a file named "check" that gets created.

The gnu project advises that all GNU software should include a set of 20 standard targets (source: https://www.gnu.org/software/make/manual/html_node/Standard-Targets.html).

The check target (which is run by typing make check) is one of those standard targets and is in the above source defined as:

check Perform self-tests (if any). The user must build the program before running the tests, but need not install the program; you should write the self-tests so that they work when the program is built but not installed.

Other projects (not part of GNU) will sometimes follow this convention as well, or at least implement a subset of these targets.

等数载,海棠开 2024-08-18 04:27:04

根据 GNU Make 手册,它执行 self测试此 makefile 构建的程序。

According to the GNU Make manual, it performs self tests on the program this makefile builds.

怎樣才叫好 2024-08-18 04:27:04

make check 是 makefile 的命令。它执行 makefile 定义的任何操作。

听起来好像了解一下 makefile 的背景会很好。 是我的学校用于编程课程的教程。以下是一些很好的引用:

Make 可用于自动执行编译、链接和测试大型 C++ 程序所需的许多 Linux 命令。由于这些命令在程序开发过程中将被执行数百次,因此自动化这些任务至关重要。

make check is a command to a makefile. It does whatever the makefile defines it to do.

It sounds like a little background on makefiles would be good. This is a tutorial that my school uses for a programming course. Here are some good quotes:

Make can be used to automatically execute the many Linux commands that are needed to compile, link, and test a large C++ program. Since these commands will be executed hundreds of times during a program's development, automating these tasks is essential.

凶凌 2024-08-18 04:27:04

最常见的地方是使用 automake 时。 Automake 的功能使得(没有双关语)生成一系列测试用例并生成漂亮的结果摘要相对简单。有关详细信息,请参阅此处

The most common place that you will see this is when automake is used. Automake has features that make (no pun intended) it relatively simple to generate a series of test cases and produce a pretty summary of the results. For more info, see here:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文