Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CBS Makefile builder does not parse build / clean commands fully #1072

Open
jonahgraham opened this issue Feb 2, 2025 · 1 comment · May be fixed by #1073
Open

CBS Makefile builder does not parse build / clean commands fully #1072

jonahgraham opened this issue Feb 2, 2025 · 1 comment · May be fixed by #1073
Milestone

Comments

@jonahgraham
Copy link
Member

Entering anything other than a simple string in CBS Makefile builder's build / clean commands don't parse correctly and are not passed to make as expected.

I am referring to these fields:

Image

For example, enter make all with an extra space leads to a make error:

Image

This is happening because the builder is simply splitting on " " which leads to an extra empty command line option

This also means other, more complicated cases, such as quoted strings are not handled properly either:

Image

leads to:

Image

@jonahgraham
Copy link
Member Author

Another common-ish use case that needs proper parsing is passing things like CFLAGS on the build command line, e.g. make CFLAGS="-Wall -g" does not work today and it should be made to work, today the space in the middle is split so you get output like this:

Image

jonahgraham added a commit to jonahgraham/cdt that referenced this issue Feb 2, 2025
…upport

Without this the build and clean command entered in the CBS
settings could be parsed and re-assembled incorrectly.

A simple example is that an extra space (e.g. "make  clean") would
lead to an error when running make like:

```
make: *** empty string invalid as file name.  Stop.
```

This happened because the code used trivial split on " " and join
with " " to handle parsing that command line string into array of
arguments. This change fixes that by using the functionality already
available in CommandLineUtil

Fixes eclipse-cdt#1072
@jonahgraham jonahgraham added this to the 12.0.0 M3 milestone Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant