C语言 扩展名为“h.in”的文件是什么意思?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14248848/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What mean file with extension "h.in"?
提问by Anderson Carniel
I am studying the C language, and I saw a new extension that I had not seen before.
我正在学习C语言,我看到了一个我以前从未见过的新扩展。
What do files with the extension like library.h.inmean?
带有扩展名的文件library.h.in是什么意思?
Is it as the simple header with extension ".h"? What's the difference?
它是扩展名为“.h”的简单标题吗?有什么不同?
采纳答案by Vladimir Kolesnikov
These files are usually the input for autoconfwhich will generate final .h files.
这些文件通常是autoconf的输入,它将生成最终的 .h 文件。
Here's an example from PCRE:
这是来自 PCRE 的一个例子:
#define PCRE_MAJOR @PCRE_MAJOR@
#define PCRE_MINOR @PCRE_MINOR@
#define PCRE_PRERELEASE @PCRE_PRERELEASE@
#define PCRE_DATE @PCRE_DATE@
Autoconf will replace all variables (@…@) with the respective values and the result will be a .h file.
Autoconf 将用@…@相应的值替换所有变量 ( ),结果将是一个 .h 文件。
回答by Daniel Fischer
Typically, a .h.infile is a header template that is filled in to become the actual header by a configurescript based on the outcome of several tests for features present on the target platform.
通常,.h.in文件是一个标题模板,configure根据针对目标平台上存在的功能的多项测试结果,脚本将其填充为实际标题。
回答by syb0rg
Files ending with .in are typically template files used by a program called configurethat generates a new file without the extension after substituting for variable expansions. I.e., if you're looking at a source tree that has files called, e.g. Makefile.inin the tree, then ./configurewill generate a usable Makefile that can be used to "make" from source.
以 .in 结尾的文件通常是被调用的程序使用的模板文件,该程序configure在替换变量扩展后生成一个没有扩展名的新文件。即,如果您正在查看具有调用文件的源树,例如Makefile.in在树中,那么./configure将生成可用于从源“制作”的可用 Makefile。

