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

[WIP] rc makefile: Various improvements #3052

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

lenormf
Copy link
Contributor

@lenormf lenormf commented Aug 10, 2019

Hi,

I made changes to the highlighters that handle Makefile files in order to tick some boxes in #3051.

Here's what the project's Makefile looks like with my theme:

HTH.

According to the GNU documentation[1], the `include` keyword can also be
written `sinclude` or `-include` for side effects.

[1] https://www.gnu.org/software/make/manual/make.html#Including-Other-Makefiles

Reference mawww#3051
This commits highlights automatic variables documented by GNU[1] as values.

[1] https://www.gnu.org/software/make/manual/make.html#Automatic-Variables-1

Reference mawww#3051
The original region filled the contents of $(…) scopes with a single
face, this commit declares a new region that specifically highlights given
function names.

Most documented GNU function names[1] should be supported.

[1] https://www.gnu.org/software/make/manual/make.html#Name-Index

Reference mawww#3051
Some regex have to be duplicated because they highlight scopes that can
be present both in regular statements (e.g. variable initializations,
statements) and in shell scopes (e.g. recipes, $(shell …) scope).

Reference mawww#3051
@andreyorst
Copy link
Contributor

It seems that spaces in targets aren't supported:
image
Also, note orange ), might be some variable regex match? Here as well:
image

Other than that everything looks fine so far

@lenormf
Copy link
Contributor Author

lenormf commented Aug 12, 2019

Could you please paste the Makefile you use for testing?

@andreyorst
Copy link
Contributor

clean distclean:
	@echo "Cleaning common libraries.. ($(MAKECMDGOALS))"
	@for i in $(SUBDIRS); do \
	$(MAKE) -C $$PWD/$$i $(MAKECMDGOALS); \
	done
	$(MAKE) -C $$PWD/../tools $(MAKECMDGOALS); \
	rm -rf build *.lock

@lenormf
Copy link
Contributor Author

lenormf commented Aug 14, 2019

Thanks.

I've identified the problem, I'm just not sure how to handle that cleanly. Stay tuned.

@lenormf
Copy link
Contributor Author

lenormf commented Aug 15, 2019

I've created #3055 and #3056, which are the problems we're facing here. I'm not sure how to make highlighting accurate enough otherwise.

@lenormf lenormf changed the title rc makefile: Various improvements [WIP] rc makefile: Various improvements Aug 17, 2019
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 this pull request may close these issues.

None yet

2 participants