Bug #19344 2014-04-04 16:59

mateidavid

"Make" commands processed inconsistently or ignored

When using a custom (external) Makefile, the interface between CB and the Makefile is made through:

Build options / "Make" commands

However:

1. The command for "Compile single file" is ignored when attempting to build a single file. A generic compile command is attempted instead. Bug #18071 could be related.

2. The command for "Build project/target" is fully interpreted, but the commands for "Clean project/target" and "Ask if rebuild is needed" are not. I mean that, for "build", if one writes "cd dir && make" and the following are executed: "cd dir", then "make". However, for "clean" (and similarly for "ask"), if one writes "cd dir && make clean", the following is executed: "cd dir && make". So the "&&" is escaped, and passed as argument to "cd". This is inconsistent.

To reproduce, save this as 'print-args' and put it in your PATH:

#!/bin/bash

echo "[$PWD] $0 $@" | tee -a /tmp/print-args.log

Then use commands of the form "print-args {build|clean|ask}_target && make". You can see in /tmp/print-args.log that for "build", print-args is passed only the argument "build_target", whereas for "clean" and "ask", it is also passed the "&&" and "make" tokens.

As a workaround, for "clean" and "ask", one can force the command to be interpreted with by using, e.g. "bash -c 'cd dir && make' ".

IMO, you should allow full interpretation, as in the case of "build", because this allows more customization. Since the "build" dialog already allows it, this should be easy to fix.

Category
Application::Interface
Group
 
Status
Open
Close date
 
Assigned to