I went through the code. The additional dummy
targets are coming from
'GnuMakefileGenerator.populateDummyTargets()'.
This method picks up all the Header files from the
original rule in the generated dependency file & adds a dummy target for
each.
This is creating a problem in dependency handling
for my toolchain.
ToolB compiles %.cla & creates a file
'dsevar_%.h', which is included in the .c file.
The C dependency file should have a dep
rule => "dsevar_%.h: %.cla" [which I can put in from my
dependencyGenerator].
But after this,
'GnuMakefileGenerator.populateDummyTargets()' goes ahead & adds "dsevar_%.h:
"
As a result, my .c file does not get rebuilt when
the .cla (hence dsevar_%.h) is rebuilt.
Is there a way to skip/disable the call to
'GnuMakefileGenerator.populateDummyTargets()'?
Any other suggestions would be
appreciated.
Thankyou,
Delicia
------------------------------ From:
"Delicia" <deliciap@xxxxxxxxxx> Subject:
[cdt-dev] Dependency file generation To: <cdt-dev@xxxxxxxxxxx> Message-ID:
<066601c73ae9$51b36210$4301a8c0@xxxxxxxxxxxxx> Content-Type:
text/plain; charset="iso-8859-1"
Hi All,
I
have a toolchain plug-in based on MBS. This has a tool definition for
'myCompiler', in which the 'dependencyCalculator' attribute for
'inputType' element is set to
'org.eclipse.cdt.cradle.toolchain.mygccDependencyCalculator'.
The
'mygccDependencyCalculator' class is same as the
'DefaultGCCDependencyCalculator2' class. I also my version of
'DefaultGCCDependencyCalculator2Commands' with a small change (Don't use "-MP"
while generating the dep file).
Now my makefile gets generated with the
correct options. The corresponding command is: mygcc -I. -g -Wall
-march=3616 -c -MMD -MF"pe_code.d" -MT"pe_code.d" -o"pe_code.o"
"../pe_code.c"
However, the generated dependency file (pe_code.d) still
contains info generated by the "-MP" option. pe_code.d pe_code.o:
../pe_code.c ../pe_dse_if.h
../dsevar_dse_code.h ../pe_dse_if.h: ../dsevar_dse_code.h:
I
removed the -MP option since I didn't want the pre-processor to generate phony
targets for the headers. The make rule is fine & the same command when
run independently in bash gives the correct O/P I don't know from where the
-MP output is getting added.
Please
help!
Thanks, Delicia.
|