Zitat von Giuliano Colla <[EMAIL PROTECTED]>:

> Yesterday I posted a request for a way to improve ifdef handling, but
> the discussion was led astray by my example, and turned into widgesets,
> which was not the real issue.
>
> So I repeat my request:
>
> Sometimes ifdefs are unavoidable, as when they're used to turn on and
> off customer options.
>
> But IDE and fpc are unaware of conditional dependencies, so changing a
> conditional doesn't force a recompile of some units as it would be required.
>
> Of course a Build All is the solution, but if one forgets, one may end
> up with a program which compiles properly, but has a number of
> inconsistencies sometimes hard to detect.
>
> Is there a way to overcome this problem?
> Am I the only one to see it as a problem?
>
> I would gladly contribute an upgrade to implement this feature, but
> advice from experts on where to start from, what to look at, if hooks
> are already available in .lpi or in .ppu or .o files, etc. would be
> highly appreciated.

The codetools are already conditional aware. If a flag has changed units are
automatically reparsed.
The IDE saves the whole flags to the .compiled files and recompiles if something
changed. But it does not automatically pass the -B option.
The missing part is the compiler.
At the moment it only checks file dates and source checksums. Not the flags.

Solutions:
a) The IDE automatically passes the -B option if flags has changed. IMHO this is
a semigood solution, because it leads to too much rebuilds.
b) The compiler is enhanced to check for changed flags too. This has the
advantage that it can optimize the rebuild.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to