From e13db9239786f0d8d4c670b26dd5fb97397e8b4e Mon Sep 17 00:00:00 2001 From: Gustav Eek Date: Thu, 2 Nov 2023 23:52:54 +0100 Subject: Setup. Provide installation procedure for Pandoc templates --- Makefile | 9 +++++++-- pandoc/Makefile | 32 ++++++++++++++++++++++++++++++++ pandoc/README | 19 +++++++++++++++++++ 3 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 pandoc/Makefile create mode 100644 pandoc/README diff --git a/Makefile b/Makefile index ce3a1fa..e6dff0b 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ tmp.sty: $(addprefix tex/, $(addsuffix .sty, $(SRC))) test: make -C $@ clean make -C $@ + make -C pandoc $@ # Compilation for installation @@ -44,17 +45,20 @@ DST_PDF := $(TEXMF)/doc install: \ $(addprefix $(DST_STY)/, $(STY)) \ $(addprefix $(DST_PDF)/, $(PDF)) - texhash $(TEXMF) + make -C pandoc $@ $(DST_STY)/%.sty: %.sty mkdir -p $(dir $@) cp $< $@ + texhash $(TEXMF) $(DST_PDF)/%.pdf: %.pdf mkdir -p $(dir $@) cp $< $@ + texhash $(TEXMF) uninstall: + make -C pandoc $@ rm -f $(DST_STY)/* $(DST_PDF)/$(PKG).pdf texhash $(TEXMF) rmdir --ignore-fail-on-non-empty -p $(DST_STY) $(DST_PDF) @@ -62,7 +66,8 @@ uninstall: # Clean clean: - make -C test clean + make -C pandoc $@ + make -C test $@ rm -f tmp.sty rm -f *.aux *.hd *.log *.out rm -f *.dtx *.ins *.pdf *.sty diff --git a/pandoc/Makefile b/pandoc/Makefile new file mode 100644 index 0000000..914849f --- /dev/null +++ b/pandoc/Makefile @@ -0,0 +1,32 @@ +.PHONY: all install uninstall + +all: + @echo Noting to do + +# Install + +ifdef XDG_DATA_HOME +DST = $(XDG_DATA_HOME)/pandoc/templates +else +DST = $(HOME)/.local/share/pandoc/templates +endif + +install: $(DST)/fripost-minutes.latex + +$(DST)/%: % + mkdir -p $(dir $@) + cat < $< > $@ + +uninstall: + rm -fr $(DST)/fripost-minutes.latex + rmdir --ignore-fail-on-non-empty -p $(DST) + +# Test + +test: + make -C tests $@ + +# Clean + +clean: + make -C tests $@ diff --git a/pandoc/README b/pandoc/README new file mode 100644 index 0000000..17dedcc --- /dev/null +++ b/pandoc/README @@ -0,0 +1,19 @@ +% Pandoc templates for Fripost + +These templates contains regular `\usepackage{}` statements for all +Fripost specific. Tests and examples in this directory are Pandoc +specific only. Make sure to install the Fripost LaTeX package +according to instructions. + +# Installation + +Use GNU Make: + + make install + +# Run test + +Similarly: + + make test + -- cgit v1.2.3