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

[Makefile] Remove or refactor shell syntax highlighting #1699

Closed
ismell opened this issue Aug 29, 2018 · 4 comments
Closed

[Makefile] Remove or refactor shell syntax highlighting #1699

ismell opened this issue Aug 29, 2018 · 4 comments

Comments

@ismell
Copy link

ismell commented Aug 29, 2018

From the make docs:

Makefiles have the unusual property that there are really two distinct syntaxes in one file. Most of the makefile uses make syntax (see Writing Makefiles). However, recipes are meant to be interpreted by the shell and so they are written using shell syntax. The make program does not try to understand shell syntax: it performs only a very few specific translations on the content of the recipe before handing it to the shell.

I think we should make the syntax match what make is really doing.

foo:
	echo $${HELLO} $(dir src)

$$ is actually telling make to emit a $ to the shell script, while $(dir ...) is a built in make function that emits the text to the shell script. Right now the syntax tries to intermingle the two and results in them stepping over each other.

Also, the shell the make file is using might not be sh so you would get strange syntax highlighting for these cases as well.

@rwols
Copy link
Contributor

rwols commented Aug 29, 2018

Agreed! I think embedding the shell syntax in make was a mistake in hindsight.

@rwols
Copy link
Contributor

rwols commented Sep 7, 2018

I would just like to mention that I have a local branch now that should “do what make does”. I’ll upload it to GitHub soon and you can check it out (as a git remote). I do have to say that my impression of the syntax without the shell highlighting is that it is somewhat bare. However, it does correctly highlight make constructs inside “commented out” recipe lines. So that’s a good thing.

@deathaxe
Copy link
Collaborator

deathaxe commented Oct 8, 2020

Should be fixed by #2450

grafik

deathaxe added a commit to deathaxe/sublime-packages that referenced this issue Dec 18, 2020
Closes sublimehq#1555 (fixed)
Closes sublimehq#1671 (fixed by core)
Closes sublimehq#1696 (fixed)
Closes sublimehq#1699 (fixed)
Closes sublimehq#1771 (fixed)
Closes sublimehq#2034 (fixed)
Closes sublimehq#2329 (fixed)
Closes sublimehq#2550 (invalid)
@deathaxe deathaxe mentioned this issue Dec 18, 2020
@wbond
Copy link
Member

wbond commented Jan 14, 2021

Closing, since this has been resolved

@wbond wbond closed this as completed Jan 14, 2021
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.

4 participants