Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs/make: generate curl.1 from listed files only
Previously it rendered the page from files matching "*.d" in the correct directory, which worked fine in git builds when the files were added but made it easy to forget adding the files to the dist. Now, only man page sections listed in DPAGES in Makefile.inc will be used, thus "forcing" us to update this to get the man page right and get it included in the dist at the same time. Ref: #5146 Closes #5149
- Loading branch information
Showing
3 changed files
with
40 additions
and
41 deletions.
There are no files selected for viewing
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
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
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
361d4f3
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.
This change made it difficult to generate a complete
curl.1
. The really huge cmd-line needed breaks some of my Cygwin tool used to createdocs/curl
. I tried to split the*.d
list in suitable chunks, but thengen.pl
complains:So I'm trying to modify
gen.pl
to support a response-file used in mylib/
GNU-make like this:Unfortunately I never went to Perl-school.
Please help.
361d4f3
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.
(In my current build, the command line to generate
curl.1
is 3127 bytes long.)I don't understand what you're trying to do with perl so I'm not sure how to help here.
gen.pl mainpage
generates a full man page, with header and footer around all the given parts so it isn't made for getting called multiple times. If 3K is a too long command line, then I figuregen.pl
needs to be updated so that it instead provides three sub-commands that create: header, individual option and footer and then maybe let the makefile loop over all the options. Would that work?361d4f3
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.
In my build, I discovered a
curl -M
only gave 380 lines of help. Hence I blamed this change ofgen.pl
.But I'm not sure how
src/tool_hugehelp.c
should be generated now.I tried this:
But that gave a
curl -M
without the header as previously.361d4f3
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.
tool_hugehelp.c
is generated from thecurl.1
file the exact same way as before361d4f3
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.
Update. This works here:
which gave a
curl -M
with 3763 lines. Looks good to me.How many lines do you get? (
curl -M | wc -l
)361d4f3
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.
My doubt was rather how
docs/curl.1
should be generated with this change ofgen.pl
.But I think I've figured this out now.
361d4f3
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.
If that works, then surely it was not a matter of too long command line since that's basically just as long...
361d4f3
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.
I forgot to add, I did not use a Posix perl (like Cygwin) for this (but Strawberry's perl).
I think I should switch to Cygwin so stuff like
./gen.pl listhelp *.d
would glob the cmd-line.Strawberry's perl does not do that.