mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 08:40:26 +00:00
Start writing of the man pages
Former-commit-id: 533a8a6380a5a0b66314081a5ec2aeb973ebadec
This commit is contained in:
41
doc/man/Makefile
Normal file
41
doc/man/Makefile
Normal file
@@ -0,0 +1,41 @@
|
||||
MANPAGES= obigrep
|
||||
|
||||
BUILDDIR=../build
|
||||
MANDIR=$(BUILDDIR)/_man
|
||||
MANDEST=$(MANDIR)/man1
|
||||
HTMLDEST=$(MANDIR)/html
|
||||
|
||||
MANSRC=$(MANPAGES:=.qmd)
|
||||
DEPS=$(patsubst %,depends/%,$(MANPAGES:=.d))
|
||||
MAN=$(patsubst %,$(MANDEST)/%,$(MANSRC:.qmd=.man))
|
||||
|
||||
|
||||
|
||||
all: $(MAN)
|
||||
|
||||
clean:
|
||||
rm -f $(MAN)
|
||||
rm -rf depends
|
||||
|
||||
.PHONY: all
|
||||
|
||||
$(MANDEST):
|
||||
@echo Creating $@ directory
|
||||
@mkdir -p $@
|
||||
|
||||
$(MAN) : $(MANDEST)/%.man : %.qmd $(MANDEST)
|
||||
@echo "Rendering the man page for " $(notdir $(@:.man=))
|
||||
@quarto render $< --to man
|
||||
@mv $(notdir $@) $@
|
||||
@echo =====================================================
|
||||
@echo
|
||||
|
||||
depends/%.d: %.qmd
|
||||
@mkdir -p depends
|
||||
@echo Generating depends file for $(notdir $(@:.qmd=))
|
||||
@awk -v src=$< 'BEGIN {printf("%s: ",src)} \
|
||||
/\{\{< *include *[^>]+>\}\}/ {sub(/^ *\{\{< *include */,"",$$0); \
|
||||
sub(/ *> *\}\} */,"",$$0); \
|
||||
printf("%s ",$$0)}' $< > $@
|
||||
|
||||
-include $(DEPS)
|
||||
Reference in New Issue
Block a user