Hi Wieant,
Thanks for the response.
> BTW the dependency: >
dsevar_CLA_example.h: CLA_example.o > Is this generated build-time by the
dependency generator for your abc compiler?
No, infact the abc compiler does
not have a dependency generator.
I too was wondering where this dependency appeared
from, then thought: probably
the GNU makefile generator adds a dependency for
multiple outputType elements:
<outputType2>:
<outputType1>
As you say, it's probably this dependency that
causes this behaviour.
I might just need to drop the extra outputType, and
handle the case of the
generated header (dsevar_*.h) in the tool's
dependency calculator.
It would have been nice though, if the <tool>
element had something
similar to "multipleOfType", i.e. "A tool produces multiple outputType s in
a single invocation"
Regards,
Delicia.
------------------------------ Message:
2 Date: Fri, 22 Sep 2006 15:16:13 +0200 From: wieant@xxxxxxxxx (Wieant
Nielander) Subject: Re: [cdt-dev] Problem with multiple outputType
elements during incremental build To: "CDT General developers list."
<cdt-dev@xxxxxxxxxxx> Message-ID:
<20060922131613.GA9672@xxxxxxxxx> Content-Type:
text/plain; charset=us-ascii
> I have a tool that has 1
inputType element(.cla) & 2 outputType > elements(.o &
dsevar_%.h). > Both the outputTypes are produced with a single
invocation of the tool. > > A fresh make (after a clean) works
perfectly, i.e. in a single > invocation, both O/Ps are generated. Now,
I make a small change in the > .cla input and the incremental builder
does: > > tool.exe -c -oCLA_example.o ../CLA_example.cla >
tool.exe -c -odsevar_CLA_example.h
../CLA_example.cla > INSTEAD OF JUST >
> tool.exe -c -oCLA_example.o ../CLA_example.cla > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Generated make rules
contain: > %.o dsevar_%.h: $(ROOT)/%.cla > @echo 'Building
file: $<' > @echo 'Invoking: toolABC' > @echo
dseclasm -c -o$@ $< > @dseclasm -c -o$@ $< >
@echo 'Finished building: $<' > @echo ' ' > >
dsevar_CLA_example.h: CLA_example.o >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > I can't understand
the reason for this behaviour. > Any inputs would be
appreciated.
Delicia,
I think the cause of the problem is that
the rule:
%.o dsevar_%.h: $(ROOT)/%.cla
<action>
equals writing down 2 separate rules:
%.o:
$(ROOT)/%.cla <action> in which $@ =
%.o
dsevar_%.h: $(ROOT)/%.cla
<action> in which $@ = dsevar_%.h
but I
cannot yet explain why both actions are executed in one make invocation.
I'd expect the first invocation to update both .o as well as .h, and after
that these dependencies should have been met?
BTW the
dependency: dsevar_CLA_example.h: CLA_example.o Is this generated
build-time by the dependency generator for your abc compiler?
This
because a difference between a fresh make (after clean) and a standard make
is that the clean throws away the configuration directory including the
dependency files. So in case of the fresh make the
dsevar_CLA_example.h dependency on CLA_example.o might not been present
possibly explaining the different behavior.
Regards,
Wieant
|