Building the selected resource [message #881139] |
Sun, 03 June 2012 21:19  |
Eclipse User |
|
|
|
I have a large existing C++ code base (15000 files) that uses a recursive make system for its build. This has been set up as a single project in Eclipse CDT. There are various build configurations of interest based on 32 and 64-bit, debug and release etc. Several executables can be built, and each has a recursive make. The submakes are for static libraries that are used by all the executables. For each of these there is a folder, represented in the project as a linked resource. The linkage is relative so that the project can be stored in Perforce. At times it is convenient to build a static library on its own. I implemented a set of Make targets for this purpose. However, I have to have one for each configuration and static library, which is a lot of Make Targets.
As an alternative I have been looking at using the build icon in the toolbar, and combining it with the currently active build configuration. My aim was to be able to build using the makefile in a folder by selecting the folder and clicking the "build" icon. I tried to implement this by defining the following build command for each build configuration:
make -C ${selected_resource_loc} config=${ConfigName}
The make system is set up so this builds the main target in the Makefile, using the current configuration name to select various compiler settings. This builds what I expect sometimes, but not always. For example, if I start Eclipse and select a folder that contains a Makefile, it builds the right thing. But if I then select a different folder, it still builds the previous one. However, if I use the drop-down on the build icon to change the build configuration, it builds in the selected folder.
Is this expected behavior? Is there a way of making this work?
|
|
|
|
Powered by
FUDForum. Page generated in 0.03274 seconds