2018-10-27 17:07:36 -04:00
|
|
|
|
|
|
|
chapter-sort = $(shell echo -e $(subst $(sp),'\n',$2) | sort $1 --key=1,1 -)
|
|
|
|
|
2018-11-03 17:31:44 -04:00
|
|
|
books : Book1.pdf Book1.epub
|
2018-10-27 17:07:36 -04:00
|
|
|
|
|
|
|
Book1.pdf : $(call chapter-sort,-n,$(wildcard Book-1/*.md))
|
|
|
|
pandoc $^ -o $@
|
|
|
|
|
2018-11-03 17:31:44 -04:00
|
|
|
Book1.epub : $(call chapter-sort,-n,$(wildcard Book-1/*.md))
|
|
|
|
pandoc $^ -o $@
|
|
|
|
|
2018-10-27 17:07:36 -04:00
|
|
|
clean:
|
|
|
|
rm -rf Book1.pdf
|
|
|
|
|
|
|
|
.PHONY: books clean
|