| 1 |
TEX = /Library/TeX/texbin/pdflatex |
| 2 |
BUILD_DIR = build |
| 3 |
TEXINPUTS = $(CURDIR)//: |
| 4 |
|
| 5 |
DOCS = docs/tikz-sections-doc.tex |
| 6 |
EXAMPLES = examples/cfs-gallery.tex examples/hrs-gallery.tex examples/rc-gallery.tex examples/style-customization.tex |
| 7 |
TESTS = tests/smoke-cfs.tex tests/smoke-hrs.tex tests/smoke-keyval.tex tests/smoke-rc.tex tests/smoke-tikz-integration.tex |
| 8 |
SOURCES = $(DOCS) $(EXAMPLES) $(TESTS) |
| 9 |
|
| 10 |
.PHONY: all docs examples tests clean |
| 11 |
|
| 12 |
all: docs examples tests |
| 13 |
|
| 14 |
docs: $(DOCS) |
| 15 |
@mkdir -p $(BUILD_DIR) |
| 16 |
TEXINPUTS="$(TEXINPUTS)" $(TEX) -interaction=nonstopmode -halt-on-error -output-directory=$(BUILD_DIR) $(DOCS) |
| 17 |
|
| 18 |
examples: $(EXAMPLES) |
| 19 |
@mkdir -p $(BUILD_DIR) |
| 20 |
@for file in $(EXAMPLES); do \ |
| 21 |
TEXINPUTS="$(TEXINPUTS)" $(TEX) -interaction=nonstopmode -halt-on-error -output-directory=$(BUILD_DIR) $$file || exit 1; \ |
| 22 |
done |
| 23 |
|
| 24 |
tests: $(TESTS) |
| 25 |
@mkdir -p $(BUILD_DIR) |
| 26 |
@for file in $(TESTS); do \ |
| 27 |
TEXINPUTS="$(TEXINPUTS)" $(TEX) -interaction=nonstopmode -halt-on-error -output-directory=$(BUILD_DIR) $$file || exit 1; \ |
| 28 |
done |
| 29 |
|
| 30 |
clean: |
| 31 |
rm -rf $(BUILD_DIR) |