Skip to content

Incorrect handling of spaces before colon in rules — "make: *** No rule to make target `clean '. Stop." #38

@chambost

Description

@chambost

Makefile Rule syntax allows a space before the colon that separates targets and prerequisites [0].

e.g.
targets : prerequisites

However this causes problems for atom-build-make. Specifically the build target window (accessible by the F7 keystroke) does not handle this correctly. (This feature interacts with the underlying noseglid/build-make code).

This can be tested with a "clean" target.

When a space exists between "clean" and the colon ("clean :"), the make build will fail with the following error (use F7 to select "clean ", then build).

"make: *** No rule to make target `clean '. Stop."

(Note the space in the target name of the error output).

When the space is removed ("clean:") from the Makefile, then the F7 select build target window chooses the correct target name without spaces and the build completes successfully.

(On my system, Atom needs to be restarted between making these changes … possibly because build-make is caching the target names despite the manual change in spacing).

[0] https://www.gnu.org/software/make/manual/html_node/Rule-Syntax.html#Rule-Syntax

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions