Summary: | [EasyHack] don't break incremental builds on removed headers on non-gcc platforms | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Björn Michaelsen <bjoern.michaelsen> |
Component: | Libreoffice | Assignee: | Caolán McNamara <caolanm> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | caolanm, kendy |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Windows (All) | ||
Whiteboard: | EasyHack DifficultyBeginner SkillScript SkillWindows | ||
i915 platform: | i915 features: | ||
Attachments: |
why not do this ?
this seems to do the trick for windows |
Description
Björn Michaelsen
2011-08-15 03:11:25 UTC
Created attachment 50388 [details] [review] why not do this ? -MP This option instructs CPP to add a phony target for each dependency other than the main file, causing each to depend on nothing. These dummy rules work around errors make gives if you remove header files without updating the Makefile to match. I'll assume that the result of "don't break incremental builds on removed headers" is the goal rather than how we get there. I'll try -MP, it seems to do what we want. Can revert and return this to the pool if that fails for whatever reason. @Caolon: Hmmm, that of course works to prevent the incremental build issues, but I wonder if it is kinda dangerous because we _have_ rules for headers that need to fire. E.g. headers in the solver, which are copied over from the sourcetree: a missing or outdated header file would then be silently left untouched, while before it (rightfully) errored out. However, I cant come up with a cornercase where this would hit us, as long as we make sure that we source the dep files _after_ our rules (which we currently do). Reopening, Assigning back to default, adjusting title and platform as this still is an issue on Windows. Hacking makedepend.exe or fixing windows dep generation to do the same as gcc should do the trick. Created attachment 50559 [details] [review] this seems to do the trick for windows original > cd sot > echo \#include \<demo.hxx\> >> source/base/exchange.cxx > touch source/base/demo.hxx > make -sr 0 exchange.d has demo.hxx as a depend now > sed -i "/demo.hxx/d" source/base/exchange.cxx > rm source/base/demo.hxx > make -sr > echo $? 2, unable to rebuild because depends list removed demo.hxx > make -sr clean apply patch > echo \#include \<demo.hxx\> >> source/base/exchange.cxx > touch source/base/demo.hxx > make -sr 0 > sed -i "/demo.hxx/d" source/base/exchange.cxx > rm source/base/demo.hxx > make -sr > echo $? 0 kendy: filter-showIncludes.pl is your, how about the attached patch for windows ? http://cgit.freedesktop.org/libreoffice/core/commit/?id=797caeb095848b6b6936c22d5b0409da7810fbba I think will do the right thing closed, been quite a few days and I've removed quite a few files in between without the usual moaning, might have worked. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.