-
Notifications
You must be signed in to change notification settings - Fork 70
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
mirror: fix building documentation targets #153
Conversation
The callable `descend` command in Makefile.include is currently broken due to two reasons: 1. It is defined only for cases when the output is not suppressed by either `V=1` or `-s`. 2. The condition for checking the absence of `-s` is broken and it fails every time there is a variable definition containing the letter 's'. The `descend` command is used in documentation targets and due to these errors, these targets fail to build in the following cases: $ make V=1 doc make: Nothing to be done for 'doc'. $ make prefix="/usr" doc # <- `prefix="/usr"` contains letter 's' make: Nothing to be done for 'doc'. This fixes the two above issues by (1) defining `descend` for all cases and (2) fixing the `-s` check by querying the first word of `MAKEFLAGS` which is the correct approach for make-4.0 and higher. Signed-off-by: Viktor Malik <[email protected]>
Hi, thanks a lot for the PR! Please give me a couple days to come back from holiday and take a proper look, I don't trust my review capabilities on the phone 🙂 |
Sure, no problem! Enjoy your holiday 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
- It is defined only for cases when the output is not suppressed by either
V=1
or-s
.
Good catch, thank you!
- The condition for checking the absence of
-s
is broken and it fails every time there is a variable definition containing the letter 's'.
I can't reproduce this one. What version of make
do you use? My understanding from the doc is that only flags (valid make
options) should be passed down with MAKEFLAGS
, not random variable definitions. On my side:
$ make --version
GNU Make 4.3
[...] by querying the first word of
MAKEFLAGS
which is the correct approach for make-4.0 and higher.
Even though I can't reproduce, you've got a point, looking at how the variable works it seems to be cleaner to search for the s
flag in the first word only.
So the change looks good but I'd be curious to understand why we don't get the same results for make prefix="/usr" doc
🤔
For me:
Looking at the release notes of version 4.4, it really seems that this behavior was changed:
so I guess that explains it 🙂 |
Oh that says it all then, thanks a lot for looking! Perfect, I'll merge now 👍 |
Hi,
I'm trying to start building the bpftool Fedora package from this repo and ran across a strange issue which prevents me from building the documentation.
After some investigation, I found that the issue is in the callable
descend
command inMakefile.include
(which is specific to this repo) which is currently broken due to two reasons:V=1
or-s
.-s
is broken and it fails every time there is a variable definition containing the letter 's'.The
descend
command is used in documentation targets and due to these errors, these targets fail to build in the following cases:This PR fixes the two above issues by (1) defining
descend
for all cases and (2) fixing the-s
check by querying the first word ofMAKEFLAGS
which is the correct approach for make-4.0 and higher.