[cmake-developers] Makefile copy constructor

Andy Cedilnik andy.cedilnik at kitware.com
Mon Jul 10 10:06:58 EDT 2006


Hello,

Well, I use makefile for all the internals of CPack, such as parsing of 
files, storing variables, configuring files, etc.

Since I cannot reuse Makefile without having lots of junk left from the 
old one, what I do is create a copy of it for each generator.

So, something like this:

* Create Makefile
* Parse command line arguments
* Parse config file
* Overwrite config values with command line arguments
* For each generator:
  * Copy makefiles
  * Create generator based on makefile
  * Run generator

Currently the only thing I really need is the map of variables, but in 
the future, I will also need macros, commands, etc.

       Andy

Bill Hoffman wrote:
> At 09:32 AM 7/10/2006, Ken Martin wrote:
>   
>>> I needed copy constructor in cmMakefile, so there it is. It does not
>>> copy commands or regular expressions for now.
>>>
>>> A side note, I would like to see copy constructor or something similar
>>> for cmCommands.
>>>
>>> Any thoughts?
>>>       
>> Yuck. Have to keep that up to date every time we add/change an ivar in
>> cmMakefile not to mention I do not know what it means to have multiple
>> makefiles for a single directory. (you did ask for thoughts :)
>>     
>
> So, given Ken's yuck thought, the next obvious question, is why did you need
> a copy constructor for cmMakefile?
>
> -Bill
>
> _______________________________________________
> cmake-developers mailing list
> cmake-developers at cmake.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>   


-- 
Andy Cedilnik
Kitware Inc.




More information about the cmake-developers mailing list