[prev in list] [next in list] [prev in thread] [next in thread] 

List:       boost-build
Subject:    [Boost-build] SOlVED: Re:  Is it possible to remove dependencies?
From:       Börje_Granberg <borje.granberg () gmail ! com>
Date:       2010-04-18 19:20:29
Message-ID: v2xd04698ef1004181220rb6278c85s15ae6894a1a2a79 () mail ! gmail ! com
[Download RAW message or body]

I solved the dependency protection by writing this in my code to
prevent changes in (automatic generated) Log.h to propagate
recompilations of all files

#define LOG_H "Log.h"
#include LOG_h

//Börje

2010/4/13 Börje Granberg <borje.granberg@gmail.com>:
> Log.h is created though input from several source and header files in
> the project and the output is put in a single file so that is why it
> is big. But since the Log.h in recreated every time the build system
> should not rebuild every other file in the project.
> If it is impossible as you say I think I can solve it by using letting
> the log framework go though the files before gcc does, some kind of
> preprocessor so to say and become a 1-to-1 generator, but no sure how
> to do.
> From every .cc or .hh the "log compiler" can create a header file with
> some class definitions and implementation. There is a 1 to 1 relation
> between these. (CC/HH -> log.HH) Other files in the project include
> these log.HH files.
> From foo.cc there should first a foo.cc.log.hh and after that gcc
> should go in and create the object file. Since bar.cc that includes
> "foo.cc.log.hh" boost should also recompile this file.
>
>
> This question is related to http://lists.boost.org/boost-build/2010/04/23344.php
>
> Best regards
> Börje Granberg
>
>
> 2010/4/13 Konstantin Litvinenko <to.darkangel@gmail.com>:
>> Börje Granberg пишет:
>>>
>>> hi,
>>> The log framework in my project creates a quite big header file
>>> (Log.h) that is included in every file in the project that uses
>>> creates logs.
>>> The tool that creates this header file parses every source file and
>>> puts its output in log.h. If the log.h gets updated because foo.cc is
>>> updated I don't want bar.cc to be recompiled.
>>> The old make based build system uses a macro around the #include line
>>> so that when makedep created the dependency files, an update of Log.h
>>> does not create any dependencies at all. Note that all files that
>>> needs to be rebuild will be rebuild anyway.
>>> Does anyone know any way so solve this with boost build? Or do you
>>> have any ideas to improve the creatation of Log.h?
>>
>>  As I know it is impossible to do...
>>  Why log.h is big? I have never saw that logging can make any bloat...
>>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>>
>
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic