[PATCH] Fix build: don't recompile all C++ every time
Thiago Macieira
thiago at macieira.org
Sat Oct 5 10:41:03 UTC 2013
On sábado, 5 de outubro de 2013 17:01:08, Lubomir I. Ivanov wrote:
> On 5 October 2013 16:52, Cristian Ionescu-Idbohrn
>
> <cristian.ionescu-idbohrn at axis.com> wrote:
> > Lubomir's patch seems to do a better job, and also makes target 'uicables'
> > useless.
>
> do you know if it is possible to feed multiple wildcards to a rule, like so:
> %.o: %.cpp %.ui
>
> and then we can check if a .ui file exist and call UIC before calling
> CXX for a file with the same name in that rule, removing the rule:
> ui_%.h: %.ui .uic
>
> my idea is that changes in specific .ui files should only update
> specific .o files and not all .o files. not sure that will work in
> general.
We can't have that anymore since the ui_xxx.h files are included from headers,
which means they now apply to all C++ sources.
> also any idea where this call comes from:
> g++ -Wall -g -c -o qthelper.o qthelper.cpp
> and why adding $(UIC_HEADERS) in the dependencies fixes it? i've tried
> disabling all CXX calls, but it still triggers.
There's something wrong with make and we haven't yet figured out what.
When we have:
%.o: %.cpp ; COMMAND
Make knows that it needs to run COMMAND to create foo.o if foo.cpp exists.
According to the manual, you can add extra dependencies:
%.o: %.cpp foo.h ; COMMAND
But somehow that is not working here. Make decides not to use this rule and
then decides to use the implicit rule to compile C++ sources.
Hmmm... implicit rule. That gives me an idea.
When I was testing, I added the -r option to make so it wouldn't generate too
much debugging output. I forgot to remove it when testing. Looks like we can
turn them off by adding .SUFFIXES.
That solves that problem, but now I have another compilation error.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131005/d24a5790/attachment.sig>
More information about the subsurface
mailing list