diff options
author | Adam Spragg <adam@spra.gg> | 2022-06-29 12:43:15 +0100 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2022-06-29 15:30:23 +0100 |
commit | 35c47cd0e7361d5f4c19339a8143c74417d21402 (patch) | |
tree | d34f6d54cdaf37da5f523604700b8100ecaa1335 /Makefile | |
parent | b46002f1c47d7716fc582269e3d943b87bbdcf9c (diff) |
doc: Generate the man page from markdown
Because who wants to hand-write groff markup these days?
This adds pandoc(1) as a build-dependency.
The man page output isn't great, but it's the best I can do with
standard markdown
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -30,7 +30,7 @@ DOCS := \ LICENSE.GPLv2 \ NEWS \ README \ - metastore.txt \ + metastore.md \ examples \ metastore_COMP := CC @@ -85,7 +85,7 @@ SLL_EXT := .a ### Default target -all: libs bins +all: libs bins man1/metastore.1 bins: $(BINS) libs: $(LIBS) @@ -315,9 +315,10 @@ $(SDEP): $(SRCS) $(PROJ_DIR)Makefile fi \ done) >>$(SDEP) -$(DOCS_DIR)%.txt: $(MANS_DIR)/man1/%.1 - @echo " GROFF $@" - $(HIDE)groff -mandoc -Kutf8 -Tutf8 $^ | col -bx >$@ +$(MANS_DIR)man1/metastore.1: $(DOCS_DIR)metastore.md + @mkdir -p $(MANS_DIR)man1 + @echo " PANDOC $@" + $(HIDE)pandoc -s --shift-heading-level=-1 -f markdown -t man $^ >$@ ### Rules for phony targets @@ -327,10 +328,12 @@ clean: $(HIDE)$(RM) $(addprefix $(BINS_DIR),$(BINS)) \ $(addprefix $(LIBS_DIR),$(LIBS_ALL_FILES)) \ $(addprefix $(OBJS_DIR),$(OBJS)) \ + $(addprefix $(MANS_DIR),$(MANS)) \ $(SDEP) distclean: clean $(HIDE)(find \ + $(MANS_DIR) \ $(OBJS_DIR) \ $(LIBS_DIR) \ $(BINS_DIR) \ |