diff midterm/modus-ponens/Makefile @ 0:c9b5432397b7

first commit
author hamase
date Thu, 08 Nov 2018 10:57:19 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/midterm/modus-ponens/Makefile	Thu Nov 08 10:57:19 2018 +0900
@@ -0,0 +1,37 @@
+# Settings
+TARGET=modus-ponens
+BIBTEX=echo # pbibtex
+BB=extractbb
+
+vpath pdf fig
+FIGURES=$(wildcard fig/*.pdf)
+FIGURES_FOR_TEX=$(subst .pdf,.xbb,$(FIGURES))
+
+# dependencies
+$(TARGET).pdf : $(TARGET).dvi
+	dvipdfmx $<
+
+$(TARGET).dvi : $(wildcard *.tex) $(FIGURES_FOR_TEX) $(SOURCES_FOR_TEX)
+	platex  $(TARGET).tex
+	$(BIBTEX) $(TARGET)
+	platex  $(TARGET).tex
+	platex  $(TARGET).tex
+
+%.xbb: %.pdf
+	$(BB) $<
+
+
+# commands
+.PHONY : clean all open remake
+
+clean:
+	rm -f *.dvi *.aux *.log *.pdf *.ps *.gz *.bbl *.blg *.toc *~ *.core *.cpt *.lof *.lot *.lol *.bbl *.blg
+
+all: $(TARGET).pdf
+
+open: $(TARGET).pdf
+	open $(TARGET).pdf
+
+remake:
+	make clean
+	make all