On Mon, Sep 9, 2013 at 6:56 PM, Jose A. Lopes <[email protected]> wrote:
> > While right now we don't have library differences or "ifdefs" > > differences, there are plans to get some. > > See for example bug: > > https://code.google.com/p/ganeti/issuefetched.txts/detail?id=535<https://code.google.com/p/ganeti/issues/detail?id=535> > > I have looked at this issue. The patch I will send to this thread > contains a fix to address this issue. In summary, it uses a C > preprocessor definition (i.e., -DTEST) when the test profile is > enabled (i.e., HTEST=true). I read what you wrote about the multiple > profiles and their combination. I haven't been able to come up with a > solution that allows us to combine profiles. So the patch I am > sending only allows one profile at a time (or it should only be used > with one profile at a time). In any case, do we have a concrete use > case where we would like to combine multiple profiles ? > > (The patch will follow in the next email in this thread) > > Thanks, > Jose > I think Guido's suggestion might be the better approach to this issue. Your patch introduces already quite some code duplication (there are quite some lines which do the same thing for coverage, profile, test and normal compilation). I wouldn't go as far as defining which files support/need specific flags, but only define a HOUTPUTSUFFIX variable which holds a string like ".ct" (for coverage and test), or "" (for "normal" compilation). Then most parts of the makefile won't bother about profiles or compilation flags, you just have to figure out the right output suffix at the beginning. Introducing new profiles would get easier this way too. As further work, we could think about having a common htools-library. This would enable us to compile this library once, and then all executables in parallel afterwards. Cheers, Thomas -- Thomas Thrainer | Software Engineer | [email protected] | Google Germany GmbH Dienerstr. 12 80331 München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores
