From 56e6857e71d2b2a2236625f3c8b112bd40a8b164 Mon Sep 17 00:00:00 2001 From: Josselin Poiret Date: Fri, 16 Feb 2024 00:21:06 +0800 Subject: [PATCH] Add documentation generation. This requires the manpage XSL and asciidoc config files from git 2.41.0. Modified-by: Hilton Chain --- Documentation/Makefile | 34 ++++++++++++++++++++++++++++++++++ Makefile | 17 +++-------------- 2 files changed, 37 insertions(+), 14 deletions(-) create mode 100644 Documentation/Makefile diff --git a/Documentation/Makefile b/Documentation/Makefile new file mode 100644 index 0000000..d81ffbe --- /dev/null +++ b/Documentation/Makefile @@ -0,0 +1,34 @@ +MAN_BASE_URL := $(prefix)/share/doc/git-doc/ +VERSION := $(git log --pretty="%H" -n 1) + +ASCIIDOC := asciidoc +ASCIIDOC_EXTRA := +ASCIIDOC_HTML := xhtml11 +ASCIIDOC_DOCBOOK := docbook +ASCIIDOC_CONF := -f asciidoc.conf +ASCIIDOC_COMMON := $(ASCIIDOC) $(ASCIIDOC_EXTRA) $(ASCIIDOC_CONF) \ + -amanmanual='git-filter-repo Manual' -amansource='git-filter-repo $(VERSION)' +ASCIIDOC_DEPS := asciidoc.conf +TXT_TO_HTML := $(ASCIIDOC_COMMON) -b $(ASCIIDOC_HTML) +TXT_TO_XML := $(ASCIIDOC_COMMON) -b $(ASCIIDOC_DOCBOOK) +MANPAGE_XSL := manpage-normal.xsl +XMLTO := xmlto +XMLTO_EXTRA := -m manpage-bold-literal.xsl \ + --stringparam man.base.url.for.relative.links='$(MAN_BASE_URL)' + +manpage-prereqs := $(wildcard manpage*.xsl) +manpage-cmd := $(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man + +%.xml : %.txt $(ASCIIDOC_DEPS) + $(TXT_TO_XML) -d manpage -o $@ $< + +man1/%.1 : %.xml $(manpage-prereqs) + mkdir -p man1 + $(manpage-cmd) -o man1 $< + +html/%.html : %.txt $(ASCIIDOC_DEPS) + mkdir -p html + $(TXT_TO_HTML) -d manpage -o $@ $< + +man: man1/git-filter-repo.1 +html: html/git-filter-repo.html diff --git a/Makefile b/Makefile index a443450..d965ae5 100644 --- a/Makefile +++ b/Makefile @@ -20,21 +20,10 @@ test: fixup_locale: sed -ie s%@@LOCALEDIR@@%$(localedir)% git-filter-repo -# People installing from tarball will already have man1/git-filter-repo.1 and -# html/git-filter-repo.html. But let's support people installing from a git -# clone too; for them, just cheat and snag a copy of the built docs that I -# record in a different branch. -snag_docs: Documentation/man1/git-filter-repo.1 Documentation/html/git-filter-repo.html +doc: + $(MAKE) -C Documentation man html -Documentation/man1/git-filter-repo.1: - mkdir -p Documentation/man1 - git show origin/docs:man1/git-filter-repo.1 >Documentation/man1/git-filter-repo.1 - -Documentation/html/git-filter-repo.html: - mkdir -p Documentation/html - git show origin/docs:html/git-filter-repo.html >Documentation/html/git-filter-repo.html - -install: snag_docs #fixup_locale +install: doc #fixup_locale install -Dm0755 git-filter-repo "$(DESTDIR)/$(bindir)/git-filter-repo" install -dm0755 "$(DESTDIR)/$(pythondir)" ln -sf "$(bindir)/git-filter-repo" "$(DESTDIR)/$(pythondir)/git_filter_repo.py" base-commit: cbc6535694380d3a3bf3e5c96410d4ce7e8de94f -- 2.41.0 le. Arun Isaac 2022-05-01Add (guix least-authority)....* guix/least-authority.scm: New file. * Makefile.am (MODULES): Add it. * gnu/build/shepherd.scm (default-mounts): Make public. Ludovic Courtès 2022-04-12shepherd: Add #:supplementary-groups....To support the argument introduced in Shepherd 0.9.0 when defining container-bound services. * gnu/build/shepherd.scm (exec-command*) (make-forkexec-constructor/container): Add '#:supplementary-groups'. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Leo Nikkilä 2022-04-11shepherd: 'fork+exec-command/container' always returns a PID....Fixes a regression introduced in 938448bf40fc77092859352d2243e2d0c236375f whereby 'fork+exec-command/container' would return #t, then used as the running value of the 'guix-daemon' service in the installer. Upon installation completion, stopping the 'guix-daemon' service would fail with wrong-type-arg because that #t would be passed to the 'stop' method in lieu of a PID. * gnu/build/shepherd.scm (fork+exec-command/container): Return a PID rather than #t. Ludovic Courtès 2022-04-11shepherd: 'exec-command*' has a valid default #:directory....Fixes a regression introduced in 938448bf40fc77092859352d2243e2d0c236375f where 'exec-command*' could get #:directory #f, in particular when called by 'fork+exec-command/container'. * gnu/build/shepherd.scm (exec-command*): Add default value for #:directory. Ludovic Courtès 2022-04-07shepherd: Adjust 'fork+exec-command/container' for the Shepherd 0.9....* gnu/build/shepherd.scm (exec-command*): New procedure, with code formerly... (make-forkexec-constructor/container): ... here. Use it. (fork+exec-command/container): Use 'fork+exec-command' only when CONTAINER-SUPPORT? is false or PID is the current process. Ludovic Courtès 2021-08-02build: shepherd: Use autoload to lazily bind Shepherd modules....Instead of imperative module-autoload! directives. * gnu/build/shepherd.scm: Replace module-autoload! directives by autoload arguments for define-module. Maxim Cournoyer