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

Bug 361185

Summary: update SourceDir's makefile.lib to make the clean rule work better for custom build
Product: [Technology] RTSC Reporter: Karl Wechsler <karl>
Component: CoreAssignee: Dave Russo <d-russo>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: ademars, dfriedland
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: target:3.23

Description Karl Wechsler CLA 2011-10-17 16:07:14 EDT
Need it to be quiet build so remove the 'echo' as well.  We're having problems with the clean rule because of change to some of the env variable names in CCSv5.1.  (GEN_MISC_QTD changed to GEN_MISC_QUOTED) or some such.

Change this:

#
# ======== rules ========
#
$(sysbios_LIB): $(GEN_CMDS) $(wildcard $(sysbios_SRC)/*.c) $(sysbios_SRC)/makefile
	@echo making $@ ...
	@$(MAKE) --no-print-directory -C $(sysbios_SRC)
	
.sysbios_clean:
	@echo cleaning $(sysbios_SRC) ...
	-@$(MAKE) --no-print-directory -C $(sysbios_SRC) clean

to something like this:

#
# ======== rules ========
#
$(sysbios_LIB): 
	@$(MAKE) --no-print-directory -C $(sysbios_SRC)
	
.sysbios_clean:
	@echo cleaning $(sysbios_SRC) ...
	-@$(MAKE) --no-print-directory -C $(sysbios_SRC) clean
Comment 1 Dave Russo CLA 2011-11-09 18:16:46 EST
After working with Alan, we decided to keep the echo (for now); it helps us to know what is going on under the covers, it's not "too noisy", and it avoids confusing messages from make that say there is "nothing to do" when, without the echo, it looks like we didn't ask make to do anything in the first place.

As for the GEN_MISC_* symbols, these are managed in a file that is not part of XDCtools.  But has been fixed in the Grace and BIOS products.
Comment 2 Alan DeMars CLA 2011-11-15 14:07:56 EST
Verify Pass

CCS:

1) Using CCS I create a project (the BIOS stairstep example) and built it using custom library build flow. Everything worked as planned.

2) I modified Task.c within the installed SYS/BIOS product and pressed 'build' again. Custom library was rebuilt as expected.

3) As noted before, if I then simply press 'build' again, a null make of the sysbios.lib file is shown in the build log.

package.bld:

1) Using the package.bld flow I built a testcase using the custom library build flow. Everything worked as planned.

2) I modified Task.c within the installed SYS/BIOS product and built the test again. Custom library was rebuilt as expected.

3) As noted before, if I then simply build the test again, a null make of the sysbios.lib file is shown in the build log.

Undesired behavior in CCS build flow:

Problem A) invoking 'build' after switching to a new SYS/BIOS version simply results in another null re-make of the sysbios.lib. No re-generation of the library occurs.

Problem B) if you try to resolve Problem A by performing a 'clean' and then a build, two builds of sysbios.lib occur. The first one is simply a remake using the old makefile. The second occurs after the makefile gets regenerated due to the clean.
Comment 3 Dave Russo CLA 2011-11-29 13:03:43 EST
verified by Alan
Comment 4 Dave Russo CLA 2011-11-29 16:05:20 EST
released in xdctools 3.23.0.32