• 8805阅读
  • 9回复

qmake的recursive参数是什么用的? [复制链接]

上一主题 下一主题
离线fcymk2
 

只看楼主 倒序阅读 楼主  发表于: 2009-02-11
— 本帖被 XChinux 执行加亮操作(2009-02-16) —
用QT for Eclipse,用里面的Make Targets就会调用这么一句 qmake -recursive aa.pro 这个参数有什么用?
离线280923299
只看该作者 1楼 发表于: 2009-02-13
-recursive?? -递归?
离线fcymk2

只看该作者 2楼 发表于: 2009-02-16
翻译过来的意思 我知道啊....

我是问有什么作用
离线浪漫天使
只看该作者 3楼 发表于: 2009-02-16
应该就是找子啊 孙子啊 孙子的子啊 这些递归目录咯。。。。
离线fcymk2

只看该作者 4楼 发表于: 2009-02-17
是指 自动检索 pro 文件里面指定的cpp文件内定义的头文件? 不用自己设置? 还是别的什么用途?
离线浪漫天使
只看该作者 5楼 发表于: 2009-02-17
你自己多建 几个空的子目录 空的孙目录 试试就知道拉。。
离线fcymk2

只看该作者 6楼 发表于: 2009-02-17
建空的目录? 目录里面要放文件不?
离线浪漫天使
只看该作者 7楼 发表于: 2009-02-17
晕倒,有文件叫空目录么。。。
就是为了验证 recursive 对文件起作用还是对目录起作用。。。
多动手验证自己的想法  ok?
离线fcymk2

只看该作者 8楼 发表于: 2009-02-21
建了空目录后用 recursive 和不用 生成的 makefile 是一样的

把一个头文件放到这个目录里面 一样也是搜索不到(没在pro文件中定义)

还是没明白有什么用-_-
离线fcymk2

只看该作者 9楼 发表于: 2009-02-21
官方的说明...暂时没看明白...慢慢研究了

recursive

Indicates that rules should be created in the Makefile and thus call the relevant target inside the sub-target specific Makefile. This defaults to creating an entry for each of the sub-targets.

For convenience, there is also a method of customizing projects for new compilers or preprocessors:
new_moc.output  = moc_${QMAKE_FILE_BASE}.cpp
new_moc.commands = moc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
new_moc.depend_command = g++ -E -M ${QMAKE_FILE_NAME} | sed "s,^.*: ,,"
new_moc.input = NEW_HEADERS
QMAKE_EXTRA_COMPILERS += new_moc
With the above definitions, you can use a drop-in replacement for moc if one is available. The commands is executed on all arguments given to the NEW_HEADERS variable (from the input member), and the result is written to the file defined by the output member; this file is added to the other source files in the project. Additionally, qmake will execute depend_command to generate dependency information, and place this information in the project as well.
These commands can easily be placed into a cache file, allowing subsequent project files to add arguments to NEW_HEADERS.
The following tables are an overview of the options available to you with the QMAKE_EXTRA_COMPILERS variable.
快速回复
限100 字节
 
上一个 下一个