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

Bug 367369

Summary: Non-default build commands not actually executed in Linux
Product: [Tools] CDT Reporter: Josh Davidson <josh.davidson>
Component: cdt-buildAssignee: cdt-build-inbox <cdt-build-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3 CC: aegges, cdtdoug
Version: 8.1.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Screenshot of how things are setup. This is from Windows, but setup is basically identical in Linux none

Description Josh Davidson CLA 2011-12-21 15:53:20 EST
Build Identifier: 20110916-0149

I'm attaching a screenshot showing my configuration.  Essentially, I have a project that doesn't use Make.  I've unchecked the "Use default command", blanked out the "Build command" text box, and provided commands for the Build & Clean "targets" under the behavior tab.  In Windows, when I do a build or a clean, these commands are executed.  In Linux, they are just echoed out to the build console, but they aren't actually executed.  Here is an example:


**** Build of configuration linux64-bindings for project SimExternalInterfaces ****

 python setup.py bdist_egg --plat-name=linux64 build_ext build --build-platlib=build/linux64 

**** Build Finished ****

Nothing has happened.

Reproducible: Always

Steps to Reproduce:
1. Uncheck use default build command and blank out the build command
2. In the behavior tab, add something like touch blah.txt for the Build behavior
3. Do a build, note that touch blah.txt was echoed to the console, discover that blah.txt wasn't created
Comment 1 Josh Davidson CLA 2011-12-21 15:54:11 EST
Created attachment 208708 [details]
Screenshot of how things are setup.  This is from Windows, but setup is basically identical in Linux
Comment 2 Axel Mueller CLA 2012-02-24 04:00:51 EST
(In reply to comment #0)
I think you misinterpreted the setup. 
In "Build command" you should insert your actual build command. On the behavior tab you insert the "make targets" that are used for incremental build/clean etc.

Eclipse will then call "BUILD_COMMAND MAKE_TARGET"

So MAKE_TARGET is a kind of argument (the syntax is borrowed from original make).
In your case where you defined no build command you will get the following command line:
 python setup.py bdist_egg --plat-name=linux64 build_ext build
--build-platlib=build/linux64

Notice the space at the beginning which prevents the execution of this command. I don't know why this works under Windows but the principal behavior of Eclipse is identical.

see Help page http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_build.htm

Your setup is a little tricky as you have different commands for build and clean. You could try to create a small Makefile has two possible make targets for build and clean.