如何控制使用 MPC 时清理的输出目录和文件?
我正在尝试使用 OpenDDS(和 ACE/TAO),它使用 MPC(Make Project Creator)生成实际的 make 文件,它做了一些非常烦人的事情。
首先,它生成许多中间源文件(一些 IDL 和 C++ 头文件/实现),并将它们与手动创建的 IDL 和 C++ 文件放在同一目录中。我希望手动创建的文件和生成的文件位于不同的目录中,因为所有生成的文件都会分散注意力。有什么办法可以做到这一点吗?
其次,让我运行“make clean”,它会清理生成的目标文件,但不会清理生成的源文件。有没有办法让它清理所有生成的文件?
I'm experimenting with OpenDDS (and ACE/TAO), which uses MPC (Make Project Creator) to generate the actual make files, and it's doing a couple really annoying things.
First, it generates a lot of intermediate sources files (some IDL, and c++ headers/implementation), and it places them in the same directory with manually created IDL and C++ files. I'd like to have the manually created files and the generated files be in separate directories, because all the generated files are distracting. Is there any way to do this?
Second, make I run "make clean" it cleans up the generated object files, but it does not clean up generated source files. Is there a way to make it clean all the generated files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要删除所有生成的文件(使用 make 文件时),只需执行“make realclean”即可。 “make clean”只是清理 C++ 编译产品(目标文件、库和可执行文件),而“make realclean”则删除所有生成的文件。
更改生成文件的输出目录可能不是您真正想要做的事情。是的,生成的大量 IDL 和 C++ 有时确实会造成妨碍,但过了一段时间后,您就会学会忽略它们。如果您对此一意孤行,一种间接的方法是使用 MPC 附带的clone_build_tree.pl 脚本。该脚本创建一个新目录(在 build/xxx 下),其中包含所有源文件的符号链接。然后,您可以在那里进行构建,保持原始源目录不变。这是一个简化的示例(假设 ACE、TAO 和 MPC 已设置):
To delete all the generated files (when using make files), simple do a 'make realclean'. 'make clean' simply cleans up the C++ compilation products (object files, library, & executables) while 'make realclean' removes all generated files.
Changing the output directory for the generated files is probably not something you really want to do. Yes, the large amount of generated IDL and C++ does sometimes get in the way, but after a while you learn to look past them. If you are dead set on this, one indirect way is to use the clone_build_tree.pl script that comes with MPC. This script creates a new directory (under build/xxx) which contains symbolic links to all the source files. You then do your build there, leaving the original source directories pristine. Here is a simplified example (assumes ACE, TAO, and MPC are already setup):