formations/python-avance/Makefile

32 lines
561 B
Makefile
Raw Normal View History

2020-03-01 23:39:47 +00:00
SRCS := $(sort $(wildcard *-*.md))
2020-02-22 23:59:08 +00:00
.PHONY: help
help:
@echo "Usage:"
@echo " make static # to build static version."
@echo " make test # to run tests."
@echo " make rsync # rsync to prod"
@echo " make clean"
.PHONY: check
test:
python test.py *.md
.PHONY: static
2020-03-01 23:39:47 +00:00
static: output/index.html
2020-02-22 23:59:08 +00:00
2021-03-29 06:35:30 +00:00
%.html: %.md
2021-05-31 12:02:38 +00:00
mdtoreveal $< --output $@
2021-03-29 06:35:30 +00:00
2020-03-01 23:39:47 +00:00
output/index.md: $(SRCS)
2021-03-29 06:35:30 +00:00
mkdir -p output
2020-03-01 23:39:47 +00:00
cat $(SRCS) > output/index.md
2020-02-22 23:59:08 +00:00
.PHONY: rsync
rsync: static
2021-05-31 11:54:19 +00:00
rsync -vah --delete output/ mdk_fr@mdk.fr:/var/www/mdk.fr/python-avancé/
2020-02-22 23:59:08 +00:00
.PHONY: clean
clean:
2020-03-01 23:39:47 +00:00
rm -fr output