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

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

Open
chambost opened this issue Oct 3, 2017 · 1 comment

Comments

@chambost
Copy link

chambost commented Oct 3, 2017

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

@chambost
Copy link
Author

chambost commented Oct 9, 2017

For contrast the underlying POSIX make standard [1], does not use any such spaces in their examples. And their rule syntax notation implies no-spaces is correct (although seems slightly ambiguous):

target [target...]: [prerequisite...][;command]
[<tab>command<tab>command...]

[1] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html

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

No branches or pull requests

1 participant