cours-m1-eea/Makefile

39 lines
752 B
Makefile
Raw Normal View History

2019-05-05 22:07:45 +02:00
#!/usr/bin/make -f
#
# Requires latexmk.
#
.PHONY: all
SHELL = /bin/bash
TEX_COMMAND = latexmk -pdf -shell-escape --quiet
TEX_FILES = $(wildcard **/**/main.tex)
PDF_FILES = $(TEX_FILES:tex=pdf)
OUTPUT_FILES = $(subst /,-,$(dir $(PDF_FILES)))
2019-06-15 11:17:53 +02:00
all: reset $(PDF_FILES)
reset:
2019-05-05 22:07:45 +02:00
@rm -rf ./public
@mkdir public
$(PDF_FILES): $(TEX_FILES)
cd ./$(dir $@); \
$(TEX_COMMAND) $(notdir $<);
cd ../../
cp $@ public/$(subst /,-,$@)
clean:
@echo -n " out log aux bbl blg dvi fdb_latexmk fls nav snm tdo toc thm vrb"|xargs -t -d ' ' -n 1 -I {} find . -iname "*.{}" -delete
find . -iname "*flymake*" -delete
find . -iname "*~" -delete
find . -iname "\#*" -delete
find . -type d -iname 'auto' -exec rm -rf {} +
cleanall: clean
rm -f $(PDF_FILES)