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

Bug 312840

Summary: [tcf] Unable to effectively include Makefile.inc in make systems which use the CFLAGS variable
Product: [Tools] TCF Reporter: Peder Andersen <Peder.Andersen>
Component: CoreAssignee: Project Inbox <dsdp.tm.tcf-inbox>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: normal    
Priority: P3 CC: cdtdoug, eugene
Version: unspecified   
Target Milestone: 0.3   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Proposed fix eugene: iplog+

Description Peder Andersen CLA 2010-05-13 16:50:41 EDT
Build Identifier: http://dev.eclipse.org/svnroot/dsdp/org.eclipse.tm.tcf/trunk@958

The TCF make rules are designed to allow users to add compilation flags on the make command line, e.g., make CFLAGS=-03.  However, the current implementation causes all CFLAGS manipulations performed by makefiles which include TCF's Makefile.inc to be ignored.  Since modifying CFLAGS is a common operation for many make systems, this causes problems.

Reproducible: Always

Steps to Reproduce:
1. Write the following makefile:
include Makefile.inc

CFLAGS += -DNECESSARY_SWITCH

test:
	@echo ${CFLAGS}

2. Run make -f test.mk
3. Observe that NECESSARY_SWITCH is not part of CFLAGS
Comment 1 Peder Andersen CLA 2010-05-13 16:53:20 EDT
Created attachment 168471 [details]
Proposed fix

Legal Message: I, Peder Andersen, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL and EDL. I am authorized by my employer, Wind River, to make this
contribution under the EPL and EDL.
Comment 2 Eugene Tarassov CLA 2010-05-18 15:59:38 EDT
I have committed the patch.
Also changed makefiles in server and examples directories.

Thanks
Comment 3 Martin Oberhuber CLA 2010-05-28 14:09:04 EDT
Bulk update: Marking all TCF fixes from the Helios period (2009-06-29 until 2010-06-01) as target 3.2 since they go through release review along with the TM 3.2 release.
Comment 4 Doug Schaefer CLA 2011-05-17 10:51:03 EDT
Moving bugs to new home for IP log.
Comment 5 Martin Oberhuber CLA 2013-06-05 06:28:54 EDT
Bulk change: Marking all bugs from the TM era (until June 2011) target 0.3