Skip to content

Commit

Permalink
Add index page for html manpages.
Browse files Browse the repository at this point in the history
  This will now generate index.html if building html docs.
  This is done using an index.adoc.in template, in which
  the FvwmConsole or FvwmPrompt manpage is removed (depending on
  if FvwmPrompt is built or not).  This means that if helper
  binaries or modules are added/removed, the template will have
  to be manually updated.

  This also makes it so the FvwmPrompt manpage is not build if
  FvwmPrompt is not being built.
  • Loading branch information
somiaj committed Dec 3, 2023
1 parent 1d1c257 commit e193476
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ config.status
configure
contrib/xsession/fvwm3.desktop
core
doc/footer.html
doc/fvwm.ent
doc/fvwm3.ent
doc/index.adoc
etc/
fvwm/fvwm
fvwm/fvwm3
Expand Down
16 changes: 11 additions & 5 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ MODULE_ADOC_SRCS = \
$(wildcard fvwm-*.adoc)

# If building FvwmPrompt, don't generate the manpage for FvwmConsole as that
# won't ever be installed.
# won't ever be installed, otherwise don't generate FvwmPrompt manpage.
if FVWM_BUILD_GOLANG
MODULE_ADOC = $(filter-out FvwmConsole.adoc, $(MODULE_ADOC_SRCS))
REMOVE_LINK = FvwmConsole.adoc
else
MODULE_ADOC = $(MODULE_ADOC_SRCS)
MODULE_ADOC = $(filter-out FvwmPrompt.adoc, $(MODULE_ADOC_SRCS))
REMOVE_LINK = FvwmPrompt.adoc
endif

EXTRA_DIST = $(MODULE_ADOC_SRCS)

nothing:

clean:
rm -f *.1 *.ad *.html
rm -f *.1 *.ad *.html index.adoc

distclean-local: clean

Expand All @@ -32,8 +34,8 @@ if FVWM_BUILD_MANDOC
man1_MANS = $(patsubst %.adoc,%.1, $(M1M))
endif
if FVWM_BUILD_HTMLDOC
html_MANS = $(patsubst %.adoc,%.html, $(M1M))
doc_DATA = $(patsubst %.adoc,%.html, $(M1M))
html_MANS = index.html $(patsubst %.adoc,%.html, $(M1M))
doc_DATA = $(html_MANS)
endif

EXTRACT_SECTIONS = \
Expand All @@ -57,6 +59,10 @@ $(html_MANS): $(SECTION_FILES)
%.1: %.adoc
"$(ASCIIDOC)" -b manpage -a "$(patsubst %.1,%,$@)" "$<" -o "$@"

index.html:
"$(SED)" '/$(REMOVE_LINK)/d' index.adoc.in > index.adoc; \
"$(ASCIIDOC)" -b html5 -a toc -a webfonts! -a index index.adoc -o index.html

%.html: %.adoc
"$(ASCIIDOC)" -b html5 -a toc -a webfonts! -a "$(patsubst %.html,%,$@)" "$<" -o "$@"

Expand Down
38 changes: 38 additions & 0 deletions doc/index.adoc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
= Fvwm3 Manual Pages

== Fvwm3

* xref:fvwm3.adoc[Fvwm 3]
* xref:fvwm3menus.adoc[Fvwm 3 Menus]
* xref:fvwm3commands.adoc[Fvwm 3 Commands]
* xref:fvwm3styles.adoc[Fvwm 3 Styles]
* xref:fvwm3all.adoc[Single Fvwm3 Manual Page]

== Fvwm3 Helper Binaries

* xref:FvwmPrompt.adoc[FvwmPrompt]
* xref:FvwmCommand.adoc[FvwmCommand]
* xref:fvwm-menu-desktop.adoc[fvwm-menu-desktop]
* xref:fvwm-menu-directory.adoc[fvwm-menu-directory]
* xref:fvwm-menu-xlock.adoc[fvwm-menu-xlock]
* xref:fvwm-perllib.adoc[fvwm-perllib]
* xref:fvwm-root.adoc[fvwm-root]
* xref:fvwm-convert-2.6.adoc[fvwm-convert-2.6]

== Fvwm3 Modules

* xref:FvwmAnimiate.adoc[FvwmAnimiate]
* xref:FvwmAuto.adoc[FvwmAuto]
* xref:FvwmBacker.adoc[FvwmBacker]
* xref:FvwmButtons.adoc[FvwmButtons]
* xref:FvwmConsole.adoc[FvwmConsole]
* xref:FvwmEvent.adoc[FvwmEvent]
* xref:FvwmForm.adoc[FvwmForm]
* xref:FvwmIconMan.adoc[FvwmIconMan]
* xref:FvwmIndent.adoc[FvwmIdent]
* xref:FvwmMFL.adoc[FvwmMFL]
* xref:FvwmPager.adoc[FvwmPager]
* xref:FvwmPerl.adoc[FvwmPerl]
* xref:FvwmPrompt.adoc[FvwmPrompt]
* xref:FvwmRearrange.adoc[FvwmRearrange]
* xref:FvwmScript.adoc[FvwmScript]

0 comments on commit e193476

Please sign in to comment.