feeds/Makefile

27 lines
658 B
Makefile
Raw Permalink Normal View History

2022-11-05 08:08:59 -04:00
# 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