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

exists_make_target edge case bug #9

Open
adsr opened this issue Aug 18, 2023 · 0 comments
Open

exists_make_target edge case bug #9

adsr opened this issue Aug 18, 2023 · 0 comments

Comments

@adsr
Copy link

adsr commented Aug 18, 2023

exists_make_target fails in an extremely narrow edge case:

user@host:~/tmp/bug$ find
.
./subdir
./Makefile
user@host:~/tmp/bug$ cat Makefile 
clean:
	true
	-$(MAKE) -C subdir clean
user@host:~/tmp/bug$ make clean && echo $?
true
make -C subdir clean
make[1]: Entering directory '/home/adam/tmp/bug/subdir'
make[1]: *** No rule to make target 'clean'.  Stop.
make[1]: Leaving directory '/home/adam/tmp/bug/subdir'
make: [Makefile:3: clean] Error 2 (ignored)
0

In this case, exists_make_target believes clean does not exist as a target because it sees output No rule to make target 'clean', but the target does exist, and would have succeeded.

The inline comment mentions parsing make -p output instead of the current behavior which I believe would be more reliable.

(Follow-up from
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1047860)

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