On Mon, 2010-04-12 at 10:06 +0200, Raphael Hertzog wrote:
> On Mon, 12 Apr 2010, Lars Wirzenius wrote:
> > The reason the auto-generated part of the manpage fails is because
>
> In what way does it fail?
In the way indicated by the submitter of the bug. To re-cap, the output
looks like this:
add [-P patch] {file} ...
Add one or more files to the topmost or named patch. Files must
be
added to the patch before being modified. Files that are modi‐
fied by
patches already applied on top of the specified patch cannot be
added.
-P patch
Patch to add files to.
The "Add one or more" paragraph is broken very badly into lines. It does
not look nice at all, and in fact hinders reading by being to different
from usual text conventions.
If you look at the manpage source, it is clear what the problem is:
.IP "\fBadd\fP [-P patch] {file} ... " 4
Add one or more files to the topmost or named patch. Files must be
added to the patch before being modified. Files that are modified by
patches already applied on top of the specified patch cannot be added.
-P patch
Patch to add files to.
The paragraph that starts with "Add one or more" should not be indented
in the source. Also, the "-P patch" file should be wrapped in
another .IP command, to format in the intended way.
Adding "SHELL=bash" changes things. The source now looks like this:
.IP "\fBadd\fP [-P patch] {file} ... " 4
Add one or more files to the topmost or named patch. Files must be
added to the patch before being modified. Files that are modified by
patches already applied on top of the specified patch cannot be added.
.IP " -P patch" 8
Patch to add files to.
The paragraphs are not indentend, and "-P patch" is marked as an
indented paragraph using the .IP command.
(It's still not perfect: too many empty lines. But at least the output
formats reasonably OK now.)
> > the Makefile rule that does the auto-generation uses bash syntax, but
> > make runs sh, which is often dash these days, not bash.
>
> We already carry a patch debian/patches/fix-manpage-generation to make it
> better work with dash. Can you suggest a replacement for $'' to avoid
> resorting to SHELL=bash ?
Sorry, I do not know how to fix that nicely for dash. Part of this is
that I am unwilling to fight through the multiple layers of escaping
that happens when you put complicated shell snippets into Makefiles,
rather than into a shell script you call from a Makefile. If upstream
wants to make things complicated, they get the responsibility of fixing
it, as well, in my opinion.
The "SHELL=bash" fix is ugly, but it works, and should not have any
adverse effect on Debian, as far as I can see.
However, the reason upstream seems to use $'' is to get an easy way to
have a TAB character, using backslash-and-t rather than embedding a
literal one. Possibly other control characters as well. If you can find
a way to get that done in dash, you should be able to solve it fairly
easily.
(I apologize for not wanting to spend time and brain cycles on fixing it
properly. I am neither a DD, nor paid to fix this, so my willingness to
endure unnecessary headaches is limited.)
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]