From 06ede2e2f54be8818ea307d005ad7a4881856b44 Mon Sep 17 00:00:00 2001 From: David Given Date: Thu, 3 Feb 2022 21:40:49 +0100 Subject: [PATCH] Fix the main documentation PDF not to use mangled character spacing. --- util/LLgen/Makefile | 22 ++++++++++++++++------ util/LLgen/doc/LLgen.n | 5 ++++- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/util/LLgen/Makefile b/util/LLgen/Makefile index 144d15bb7..8833dbbd2 100644 --- a/util/LLgen/Makefile +++ b/util/LLgen/Makefile @@ -22,8 +22,15 @@ SRCS = \ src/sets.c \ src/tokens.c +DOCS = \ + doc/LLgen.n \ + doc/LLgen_NCER.n \ + OBJS = $(patsubst %.c, $(OBJDIR)/%.o, $(SRCS)) DEPS = $(patsubst %.c, $(OBJDIR)/%.d, $(SRCS)) +PDFS = $(patsubst doc/%.n, $(OBJDIR)/%.pdf, $(DOCS)) + +all: LLgen doc LLgen: $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) @@ -33,16 +40,19 @@ $(OBJDIR)/%.o: %.c $(CC) $(CFLAGS) -MMD -c -o $@ $< $(OBJDIR)/%.pdf: doc/%.n doc/LLgen.refs - refer -p doc/LLgen.refs $^ | groff -G -e -g -p -ms -Tpdf > $@ + @mkdir -p $(dir $@) + groff -R -G -e -g -p -ms -Tpdf $< > $@ + +doc:: $(PDFS) clean: rm -rf $(OBJDIR) -install: LLgen doc/LLgen.1 $(OBJDIR)/LLgen.pdf $(OBJDIR)/LLgen_NCER.pdf $(wildcard lib/*) - install -D -s LLgen -T $(PREFIX)/bin/LLgen - install -D doc/LLgen.1 -T $(PREFIX)/man/man1/LLgen.1 - install -D $(OBJDIR)/LLgen.pdf -T $(PREFIX)/doc/LLgen - install -D $(OBJDIR)/LLgen_NCER.pdf -T $(PREFIX)/doc/LLgen +install: LLgen doc/LLgen.1 $(PDFS) $(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 + install -D $(OBJDIR)/LLgen_NCER.pdf -t $(PREFIX)/doc/LLgen install -D $(wildcard lib/*) -t $(PREFIX)/share/LLgen -include $(DEPS) diff --git a/util/LLgen/doc/LLgen.n b/util/LLgen/doc/LLgen.n index 3d9786a5b..2cd6bf992 100644 --- a/util/LLgen/doc/LLgen.n +++ b/util/LLgen/doc/LLgen.n @@ -9,7 +9,10 @@ . if t .ds <, ,\ \}\ \} -.cs 5 22u +.R1 +database doc/LLgen.refs +accumulate +.R2 .ND .EQ delim @@