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?
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):
- cd DDS
- $MPC_ROOT/clone_build_tree.pl test
- cd build/test
- export DDS_ROOT=`pwd`
- build using normal Open DDS instructions...
精彩评论