Skip to content

Commit

Permalink
doc: add Makefile for rst2man
Browse files Browse the repository at this point in the history
  • Loading branch information
thiell committed Sep 28, 2023
1 parent 0ddae8d commit f5ad9b5
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/man/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SUBDIRS = man1 man5

.PHONY: all $(SUBDIRS)

all: $(SUBDIRS)

$(SUBDIRS):
$(MAKE) -C $@ force
16 changes: 16 additions & 0 deletions doc/man/man1/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SRCDIR = ../../txt
SOURCES := $(SRCDIR)/clubak.txt \
$(SRCDIR)/cluset.txt \
$(SRCDIR)/clush.txt \
$(SRCDIR)/nodeset.txt
OBJECTS := $(SOURCES:$(SRCDIR)/%.txt=%.1)

%.1: ../../txt/%.txt
rst2man -v $< $@

all: $(OBJECTS)

force: clean all

clean:
@rm -v $(OBJECTS)
14 changes: 14 additions & 0 deletions doc/man/man5/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
SRCDIR = ../../txt
SOURCES := $(SRCDIR)/clush.conf.txt \
$(SRCDIR)/groups.conf.txt
OBJECTS := $(SOURCES:$(SRCDIR)/%.txt=%.5)

%.5: ../../txt/%.txt
rst2man -v $< $@

all: $(OBJECTS)

force: clean all

clean:
@rm -v $(OBJECTS)

0 comments on commit f5ad9b5

Please sign in to comment.