-
Notifications
You must be signed in to change notification settings - Fork 169
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
Add the ability to generate manpage and documentation for BSD systems #326
Conversation
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.
Great patch, made me learn about col
and grep -A
! They both seem to be non-POSIX (grep has no -A
: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html, and col seems to have been excluded: https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap04.html). But I tested this both on Linux and FreeBSD and it works, so let's use them.
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.
Commit title is missing "for" (Add the ability for generating...
or Add the ability to generate...
).
296e246
to
e55268f
Compare
- Stripping headers may not work as expected, as man output differs on different systems. This should work now. - Simplified output parsing procedure by replacing the regular expression by TERM=dumb. - Stripping escape sequences. - Added documentation about the intentions of this script. For more see: skvadrik#325
Windows does not have a native 'man' and 'sed' commands. Therefore, we are looking for the Cygwin versions of 'man' and 'sed'. For more see: skvadrik#325
This aims to provide a bit more clear error messages on regenerate manpage stage as well as documentation.
There is no need for redirect output with > (which doesn't work on Windows) as this is how rst2man works: rst2man [options] [<source> [<destination>]] For more see: skvadrik#325
e55268f
to
78239f2
Compare
Add the ability to generate manpage and documentation for BSD systems
TERM=dumb
.Check for
man
andsed
on Windows whenRE2C_REBUILD_DOCS
isON
Windows does not have a native
man
andsed
commands. Therefore, we are looking for the Cygwin versions ofman
andsed
. This doesn't add full Windows support. However, in case of the absence of the required programs, this shows error messages before the build stage.Rephrase error messages for
RE2C_REBUILD_DOCS=ON
This aims to provide a bit more clear error messages on regenerate manpage stage as well as documentation.
Remove rst2man output redirection as it doesn't work on Windows
There is no need for redirect output with
>
(which doesn't work on Windows) as this is how rst2man works:For the discussion see: #325