Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314349

Summary: configuro can cause unnecessary runs of configuration scripts
Product: [Technology] RTSC Reporter: Dave Russo <d-russo>
Component: ToolsAssignee: Dave Russo <d-russo>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: dfriedland, sascha
Version: unspecifiedKeywords: performance
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: targets: 3.25.00
Attachments:
Description Flags
CCS 4.2 project illustrating multiple config runs none

Description Dave Russo CLA 2010-05-25 15:53:30 EDT
It looks like the following sequence will trigger unnecessary runs of the configuration step:
1.	clean rebuild of an application project containing app.cfg
2.	touch app.cfg
3.	build project (configuration runs as expected)
4.	without any change to app.cfg, build project again and notice that configuration is re-run.

There is (arguably) a bug in the configuro/xdc integration that causes the configuration step to re-run:  changing the following line of xdc/tools/configuro/template/custom.make.exe.xdt from
    .configuro: `this.linkerCommandFile`  \
to 
    .configuro: .libraries,`suff` `this.linkerCommandFile`  \
"fixes" the problem.

Why?  Because the generated package.mak declares that big.c depends on .libraries,`suff` (to ensure any libraries are built _before_ the config step).
Comment 1 Dave Russo CLA 2010-05-25 16:05:48 EDT
more explaination: 

1. the generated package.mak declares that big.c depends on .libraries,`suff` (as a "hack" to ensure any libraries are built _before_ the config step)

2. the .configuro goal in custom.mak (generated by xdctools_3_20_00_36) only triggers the generation of big.c.

3. any re-run of configro will see that big.c depends on .libraries,* and will necessarily re-run the configuration step.

Finally, configuro is re-run even though app.cfg has not changed because the managed make makefile declare that configPkg/compile.opts depends on app.cfg but the compile.opts files is _not_ updated unless its contents change.

So, there are several possible "fixes":
    1. fix xdc to not generate the .libraries,* dependency when there are 
       no libraries
    2. "fix" configuro to add the appropriate dependency
    3. fix CCS managed make to use configPkg/linker.cmd in lieu of compile.opts since the linker command file is always updated.
Comment 2 Dave Russo CLA 2010-05-25 16:24:54 EDT
Created attachment 169896 [details]
CCS 4.2 project illustrating multiple config runs
Comment 3 Dave Russo CLA 2012-06-04 16:35:24 EDT
In CCS 5.2 with xdctools 3.23.03, the configuration step is not re-run.