From ebb037b8e400c0fa71701d15ddc598dd3124efc3 Mon Sep 17 00:00:00 2001 From: Thomas Baruchel Date: Sat, 5 Nov 2022 13:08:59 +0100 Subject: [PATCH] Update --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..07c1178 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +# Generate Atom feeds from the RsT source files + +# Directory containing source (Markdown) files +source := ./src + +# Directory containing Atom feeds +output := ./atom + +# All RsT files in src/ are considered sources +sources := $(wildcard $(source)/*.rst) + +# Convert the list of source files (RsT files in directory src/) +# into a list of output files (Atom feeds in directory atom/). +objects := $(patsubst %.rst,%.xml,$(subst $(source),$(output),$(sources))) + +all: $(objects) + +# Recipe for converting a Markdown file into PDF using Pandoc +$(output)/%.xml: $(source)/%.rst + python3 rst2atom.py $< > $@ + # git add $@ + +.PHONY : clean + +clean: + rm -f $(output)/*.xml