Skip to content

Instantly share code, notes, and snippets.

@Gavinok
Created March 6, 2021 15:37
Show Gist options
  • Save Gavinok/c5df6686526c547a326e85fc87cd2846 to your computer and use it in GitHub Desktop.
Save Gavinok/c5df6686526c547a326e85fc87cd2846 to your computer and use it in GitHub Desktop.
Makefile for ing
.SUFFIXES: .ms .ps .pdf
# Groff settings
PRE = preconv | tbl| eqn
ROFF = troff
POST = grops
# Neatroff settings
BASE = $(HOME)/.local/share/neat
ROFF = $(BASE)/neatroff/roff
POST = $(BASE)/neatpost/post
PPDF = $(BASE)/neatpost/pdf
EQN = $(BASE)/neateqn/eqn
REFR = $(BASE)/neatrefer/refer
PIC = $(BASE)/troff/pic/pic
TBL = $(BASE)/troff/tbl/tbl
SOIN = $(BASE)/soin/soin
ROFFOPTS = -F$(BASE) -M$(BASE)/tmac
MACROS = -mpost -mtbl -mkeep -men -msrefs -mgr
POSTOPTS = -F$(BASE) -pa4
REFROPTS = -m -e -o ct -p ref.bib
GSOPTS = -dPDFSETTINGS=/prepress -dEmbedAllFonts=true \
-sFONTPATH=$(BASE)/fonts/ -sFONTMAP=$(BASE)/fonts/Fontmap
PRE = cat $< | $(SOIN) | \
$(REFR) $(REFROPTS) | $(PIC) | $(TBL) | $(EQN)
all: gav.pdf tmp.pdf
.ps.pdf:
ps2pdf $(GSOPTS) $<
.ms.ps:
cat $< | $(PRE) | $(ROFF) $(ROFFOPTS) -ms \
| $(POST) $(POSTOPTS)> $@
clean:
rm -f *.ps *.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment