-
Notifications
You must be signed in to change notification settings - Fork 386
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
refactor(make): Use awk to extract target names #1069
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scop
reviewed
Nov 19, 2023
akinomyoga
force-pushed
the
use-awk-for-make
branch
from
November 19, 2023 22:02
36a2e37
to
4eecb9a
Compare
scop
approved these changes
Nov 22, 2023
akinomyoga
force-pushed
the
use-awk-for-make
branch
2 times, most recently
from
November 23, 2023 01:29
1a22105
to
10d1ec2
Compare
amend |
akinomyoga
force-pushed
the
use-awk-for-make
branch
from
November 23, 2023 10:51
10d1ec2
to
e18667a
Compare
Solaris awk lacks many POSIX features as listed below. When any of them is used, we use XPG4 awk at /usr/xpg4/bin/awk instead of Solaris awk at /usr/bin/awk. - Solaris awk does not support ENVIRON. - Solaris awk does not support the function `tolower`. - Solaris awk does not support user-defined functions. - Solaris awk does not support `-F ERE' but only supports -F<char>. - Solaris awk does not accept an option argument for `-F` in a separate word. The option argument needs to be specified in the same command-line word as `-F<char>`. - Solaris awk does not support the command-line option `-v var=value` Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
The condition `$NF=2` in the awk script actually assigns a value `2` to the last field instead of comparing it to `2` and always evaluates to true. I suspect it to be `NF >= 2`. This could possibly be intended as `NF == 2` or `$NF == 2`, but neither seems to work correctly. The input contains the names of man entries of the form ` perlxx <description>`, but the description is usually given by more than one words, so restricting them by `NF == 2` would be unreasonable. On the other hand, there are no entries ending with the word `2` so `$NF == 2` would produce no results. This condition was introduced from the beginning when the related code was introduced in commit 4254f3a. There does not seem to be any hints on the background of `$NF=2`.
akinomyoga
force-pushed
the
use-awk-for-make
branch
from
November 27, 2023 21:19
e18667a
to
302dc52
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the last piece of
#TODO:API
.This is also the refactoring mentioned in #546 (comment). As mentioned there, we might separate the awk script to another file in
helpers/
.