diff --git a/util/LLgen/Makefile b/util/LLgen/Makefile index 8833dbbd2..e3f39deed 100644 --- a/util/LLgen/Makefile +++ b/util/LLgen/Makefile @@ -29,6 +29,7 @@ DOCS = \ OBJS = $(patsubst %.c, $(OBJDIR)/%.o, $(SRCS)) DEPS = $(patsubst %.c, $(OBJDIR)/%.d, $(SRCS)) PDFS = $(patsubst doc/%.n, $(OBJDIR)/%.pdf, $(DOCS)) +HTMLS = $(patsubst doc/%.n, $(OBJDIR)/%/index.html, $(DOCS)) all: LLgen doc @@ -41,14 +42,18 @@ $(OBJDIR)/%.o: %.c $(OBJDIR)/%.pdf: doc/%.n doc/LLgen.refs @mkdir -p $(dir $@) - groff -R -G -e -g -p -ms -Tpdf $< > $@ + refer $< | groff -G -e -g -p -ms -Tpdf $< > $@ -doc:: $(PDFS) +$(OBJDIR)/%/index.html: doc/%.n doc/LLgen.refs + @mkdir -p $(dir $@) + refer $< | (cd $(dir $@) && groff -I$(PWD) -G -e -g -p -ms -Thtml) > $@ + +doc:: $(PDFS) $(HTMLS) clean: rm -rf $(OBJDIR) -install: LLgen doc/LLgen.1 $(PDFS) $(wildcard lib/*) +install: LLgen doc/LLgen.1 $(PDFS) $(HTMLS) $(wildcard lib/*) install -D -s LLgen -t $(PREFIX)/bin install -D doc/LLgen.1 -t $(PREFIX)/man/man1 install -D $(OBJDIR)/LLgen.pdf -t $(PREFIX)/doc/LLgen