From b99aa026875589d4f0e71c21fb9bf8021ebf7257 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20A=2E=20Holm?= Date: Sat, 16 Nov 2024 20:15:07 +0100 Subject: [PATCH] std/c/: Create `make html` and `make pdf` Creates only README.html and README.pdf for now. 3bc63cb4-a44f-11ef-a877-83850402c3ce --- Lib/std/c/Makefile | 8 ++++++++ Lib/std/c/README.md | 21 +++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Lib/std/c/Makefile b/Lib/std/c/Makefile index 6e7b3241..eb04a838 100644 --- a/Lib/std/c/Makefile +++ b/Lib/std/c/Makefile @@ -48,10 +48,18 @@ edit: tags .PHONY: FORCE FORCE: +.PHONY: html +html: + $(MAKE) README.html + .PHONY: install install: cd src && $(MAKE) $@ +.PHONY: pdf +pdf: + $(MAKE) README.pdf + .PHONY: test test: cd src && $(MAKE) $@ diff --git a/Lib/std/c/README.md b/Lib/std/c/README.md index 5dfb3753..fde41ac2 100644 --- a/Lib/std/c/README.md +++ b/Lib/std/c/README.md @@ -98,23 +98,20 @@ Delete the installed version from `PREFIX`. Run all tests with Valgrind to find memory leaks and other problems. Should also not fail on master. -### Create HTML +### Create HTML or PDF -All `*.md` files can be converted to HTML by replacing the `.md` -extension with `.html`. For example, use `make README.html` to generate -an HTML file from the `.md` file. If the `.md` file is stored in Git, an -extra footer with the text "Generated from *filename* revision *git-id* +`make html` creates HTML versions of all documentation in the current +directory tree, and `make pdf` creates PDF versions. + +All `*.md` files can be converted to HTML or PDF by replacing the `.md` +extension with `.html` or `.pdf`. For example, use `make README.html` to +generate an HTML file from the `.md` file, or `make README.pdf` to +create a PDF version. If the `.md` file is stored in Git, an extra +footer with the text "Generated from *filename* revision *git-id* (*date*)" is added. Uses `cmark`, available from . -### Create PDF - -PDF files can be created from `.md` files by replacing `.md` with -`.pdf`. To create `README.pdf`, execute `make README.pdf`. This will -create an HTML file from the `.md` file which is then converted to PDF -with [`wkhtmltopdf`](https://wkhtmltopdf.org/). - ## Download The main Git repository is stored at GitLab: -- 2.11.4.GIT