View | Details | Raw Unified | Return to bug 70491
Collapse All | Expand All

(-)src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java (-3 / +37 lines)
Line 329 Link Here
329
		// fix for PR 70491
330
		IPath resourceLocation = resource.getLocation();
331
		String projectLocation = project.getLocation().toString();
332
333
		String resourcePath = null;
334
		String buildRule = null;
335
		
336
		// figure out path to use to resource
337
		/**
338
		 * We need to check if the current resource is LINKED, because 
339
		 * the default CDT doesn't handle this properly.  If it IS linked,
340
		 * then we must get the actual location of the resource, rather
341
		 * than the relative path.
342
		 */
343
		if(!resourceLocation.toString().startsWith(projectLocation))
344
		{
345
			// it IS linked, so use the actual location
346
			resourcePath = resourceLocation.toString();
347
			// Add the rule and command to the makefile
348
			
349
			// need a hardcoded rule, not a pattern rule, as a linked file
350
			// can reside in any path
351
			
352
			buildRule = relativePath + resourceName + DOT + outputExtension + COLON + WHITESPACE + resourcePath;
353
		}
354
	
355
		else
356
		{
357
			// use the relative path
358
			resourcePath = relativePath; // not really needed to store per se but in the future someone may want this
359
			
360
			// Add the rule and command to the makefile
361
			buildRule = relativePath + WILDCARD + DOT + outputExtension + COLON + WHITESPACE + ROOT + SEPARATOR + resourcePath + WILDCARD + DOT + inputExtension;
362
		}
363
		// end fix for PR 70491
364
		
Lines 335-336 Link Here
335
		// Add the rule and command to the makefile
371
336
		String buildRule = relativePath + WILDCARD + DOT + outputExtension + COLON + WHITESPACE + ROOT + SEPARATOR + relativePath + WILDCARD + DOT + inputExtension;
337
--

Return to bug 70491