aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/LinuxManBook
AgeCommit message (Collapse)AuthorFilesLines
2024-03-26share/mk/: Reorganize files for generating the PDF bookAlejandro Colomar3-1897/+0
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-26share/mk/: Generate the fonts during the buildAlejandro Colomar3-11377/+0
Suggested-by: "G. Branden Robinson" <branden@debian.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-24share/mk/, scripts/LinuxManBook/build.sh: Embed script in the makefilesAlejandro Colomar1-25/+0
This is done for simplifying, and as a side effect, it also allows much more control on the script (e.g., TROFFFLAGS). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-21scripts/LinuxManBook/prepare.pl: Use more robust pipelinesAlejandro Colomar1-2/+7
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-14scripts/LinuxManBook/build.sh, share/mk/: Use command variablesAlejandro Colomar1-10/+20
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2024-03-12scripts/LinuxManBook/prepare.pl: Support some autogenerated pages from other ↵Deri1-12/+14
projects And remove a warning about an experimental perl feature, by using a while instead of a for loop. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-12-01scripts/LinuxManBook/: Simplify pipelineAlejandro Colomar5-851/+110
Call the groff(1) pipeline only once. This optimizes around 2 seconds, while also simplifying the code. This change was originally written by Deri, with some parts written by Brian. I took the script that Deri sent, and split it so that the groff(1) pipeline is called from the shell script, and the Perl script is limited to editing the man(7) pages. This helps me understand the process, since my understanding of Perl is very limited. It also makes this change smaller, so that it's less of a big-bang. Link: <https://lore.kernel.org/linux-man/ZWkO4qPC4BxkwBNm@debian/T/#m3d453440b02dd189bc12d2e629c4026206025b40> Co-developed-by: Deri James <deri@chuzzlewit.myzen.co.uk> Co-developed-by: Brian Inglis <Brian.Inglis@Shaw.ca> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-24scripts/LinuxManBook/: Shorten names of scriptsAlejandro Colomar2-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-24scripts/LinuxManBook/prepare_linux_man_book.pl: Add new function BuildSec()Alejandro Colomar1-1/+10
The intention is to move some code from BuildPage() into this function, reducing the complexity of that inner function. As a side effect, just by adding this function, I've already noticed an optimization of 0.3 s. The reason, I guess, is that it starts processing pages without waiting for the entire sort to complete, which reduces the latency of the script. Cc: Deri James <deri@chuzzlewit.myzen.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-24scripts/LinuxManBook/build_linux_man_book.sh: Call pic(1), and call it after ↵Alejandro Colomar1-1/+2
preconv(1) Call it, just in case we want to use in manual pages in the future. It doesn't hurt performance. And call it after preconv(1), which should be the first program in the groff(1) pipeline. Suggested-by: Deri James <deri@chuzzlewit.myzen.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-24scripts/LinuxManBook/prepare_linux_man_book.pl: Don't support trailing white ↵Alejandro Colomar1-2/+0
space nor \r Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-22scripts/LinuxManBook/build_linux_man_book.sh: Simplify groff(1) callAlejandro Colomar1-3/+3
We're suppressing formatted device-independent output of troff(1), so it doesn't make sense to pass an option to gropdf(1) with -P. We don't need the fonts either. We don't even need groff(1), since we're only using troff(1). Redirect to /dev/null, instead of using -z. It's more explicit. Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-22scripts/LinuxManBook/build_linux_man_book.sh: Explicitly preprocess before ↵Alejandro Colomar1-2/+6
calling groff(1) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-22scripts/LinuxManBook/build_linux_man_book.sh: Allow running from any working ↵Alejandro Colomar1-6/+8
directory Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-22scripts/LinuxManBook/build_linux_man_book.sh: Use pipes instead of temporary ↵Alejandro Colomar1-15/+15
files It's still easy to debug, by inserting |tee /dev/tty|, but the script is cleaner if it doesn't generate intermediary files, and it's also faster (on my desktop computer, it goes down from 18.5 s to 16.3 s). Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-22scripts/LinuxManBook/build_linux_man_book.sh: LicenseAlejandro Colomar1-0/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-22scripts/LinuxManBook/prepare_linux_man_book.pl: Use a helper function for ↵Alejandro Colomar1-68/+75
building pages Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-22scripts/LinuxManBook/prepare_linux_man_book.pl: wsfixAlejandro Colomar1-167/+137
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-11-21scripts/LinuxManBook/: Split the pipeline for building the Linux Man BookAlejandro Colomar3-23/+30
This helps understand how this book is built. The Perl script was too magic for my taste. Now it does less magic. :) Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-08-12scripts/LinuxManBook/: Update for groff-1.23.0Deri James10-9517/+298
Now that 1.23.0 has been released we can chop a lot of code. Reported-by: Brian Inglis <Brian.Inglis@Shaw.ca> Reported-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2023-04-02scripts/LinuxManBook/: Make the title consistent with the name of the projectAlejandro Colomar2-2/+2
Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-30scripts: tfixSamanta Navarro2-6/+6
Typos found with codespell. Signed-off-by: Samanta Navarro <ferivoz@riseup.net> Signed-off-by: Alejandro Colomar <alx@kernel.org>
2022-12-24scripts/LinuxManBook/: Add Deri's script for producing the man-pages bookAlejandro Colomar15-0/+23242
Deri is the author of all of this great work! I expect to be able to hook it into the build system, so that we can run `make book-pdf` (or something like that). Cc: Deri James <deri@chuzzlewit.myzen.co.uk> Signed-off-by: Alejandro Colomar <alx@kernel.org>