20 lines
1.2 KiB
Makefile
20 lines
1.2 KiB
Makefile
include Targets
|
|
|
|
all: $(TARGETS)
|
|
|
|
$(TARGETS):
|
|
- mkdir -p build/$@
|
|
- cp -R src/$@/images build/$@/
|
|
- cp -R src/$@/images build/$@/
|
|
- cp src/$@/*.jpg build/$@/
|
|
- cp src/$@/*.png build/$@/
|
|
|
|
- test -f ./src/$@/$@.md && pandoc -s ./src/$@/$@.tex -o ./build/$@.md --standalone --mathjax && cat ./build/$@.md | sed -e 's/\(::: center\)//g' | sed -e 's/::://g' > ./build/$@.md.tmp && mv ./build/$@.md.tmp ./build/$@.md
|
|
- test -f ./src/$@/$@.html && pandoc -B css/include.txt -s ./src/$@/$@.tex -o ./build/$@/$@.html --standalone --embed-resources=true
|
|
- test -f ./src/$@/$@.cfg && test -f ./src/$@/$@.tex && tex4ebook -c ./src/$@/$@.cfg -d build/ ./src/$@/$@.tex && rm -rf $@-epub && rm $@*.*
|
|
- test -f ./src/$@/$@.adobe && test -f ./src/$@/$@.tex && xelatex --output-format=pdf --output-directory=build/ --directory=build/ ./src/$@/$@.tex
|
|
- test -f ./src/$@/$@.oo && test -f ./src/$@/$@.tex && pandoc -V title:"" -V author:"" -s ./src/$@/$@.tex -o ./build/$@.odt --embed-resources=true --standalone
|
|
- test -f ./src/$@/$@.docx && test -f ./src/$@/$@.tex && pandoc -V title:"" -V author:"" -s ./src/$@/$@.tex -o ./build/$@.docx --embed-resources=true --standalone
|
|
clean:
|
|
- rm -rf build
|