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

Redundant match for square brackets when matching 'Entering directory' and 'Leaving directory' #90

Open
idanpa opened this issue Nov 15, 2019 · 4 comments

Comments

@idanpa
Copy link

idanpa commented Nov 15, 2019

On parser.py lines 35 and 36:

# Leverage `make --print-directory` option
make_enter_dir = re.compile(r"^\s*make\[\d+\]: Entering directory [`\'\"](?P<dir>.*)[`\'\"]\s*$")
make_leave_dir = re.compile(r"^\s*make\[\d+\]: Leaving directory .*$")

I see you expect make to print some number inside square brackets.
Why is it so? My make doesn't print this number (GNU Make 4.1 on Ubuntu 16.04) with the given flags from the manual (make -Bnwk -C directory)

@lyonlh
Copy link
Contributor

lyonlh commented Dec 4, 2019

@idanpa
It's about the depth of recursion. You should get the point from https://stackoverflow.com/questions/27943149/what-does-numbers-in-make1-make2-make3-mean and https://stackoverflow.com/questions/12842469/makes-output-the-number-in-the-brackets.
The reason your make doesn't print the number is there's no recursive make of your project.

@idanpa
Copy link
Author

idanpa commented Dec 4, 2019

Thanks @lyonlh for explaining. This is causing the parser to fail on non recursive make. Should I pass some extra flag to make or maybe you should make this regex part optional?

@agnjunio
Copy link
Collaborator

agnjunio commented Dec 4, 2019

I guess the obvious fix for this is to make the brackets in the regex optional. Someone else agree? If so, I can patch this right away.

@lyonlh
Copy link
Contributor

lyonlh commented Dec 5, 2019

I guess the obvious fix for this is to make the brackets in the regex optional. Someone else agree? If so, I can patch this right away.

@agnjunio
You're right.
Thanks!

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

3 participants