summaryrefslogtreecommitdiff
path: root/makefile
blob: 24002e8164fe3edf08a1f9ad6e721d95c589c9cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
SRC=src
BUILD=build

RMD_IN = $(wildcard $(SRC)/*.Rmd)
RMD_OUT := $(patsubst $(SRC)/%.Rmd,$(BUILD)/%.html,$(RMD_IN))

all: $(RMD_OUT)
	@mkdir -p build
	@echo "Building index"
	@Rscript build_Rmd.R $(SRC)/index.Rmd $(BUILD)/index.html > /dev/null 2>&1 
	@echo "Building RSS"
	@python3 build_rss.py
	@echo "Done"

deploy:
	@rsync -r --progress --delete --update build/ \
		lemur:/var/www/kenkellner.com/blog/

$(BUILD)/%.html: $(SRC)/%.Rmd $(SRC)/_navbar.yml $(SRC)/style.css 
	Rscript build_Rmd.R $< $@

clean:
	rm -f build/*