Initial commit
This commit is contained in:
34
Makefile
Normal file
34
Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
PROJECTNAME=$(basename $(wildcard *.tex))
|
||||
LIBS=$(notdir $(wildcard libs/*))
|
||||
|
||||
PDFS=$(addsuffix .pdf, $(PROJECTNAME))
|
||||
SYNCTEXS=$(addsuffix .synctex.gz, $(PROJECTNAME))
|
||||
|
||||
all: $(PROJECTNAME)
|
||||
|
||||
$(PROJECTNAME): $(LIBS)
|
||||
pdflatex -file-line-error $@.tex
|
||||
pdflatex -file-line-error $@.tex
|
||||
pdflatex -synctex=1 $@.tex
|
||||
|
||||
$(SYNCTEXS): $(LIBS)
|
||||
pdflatex -synctex=1 $(patsubst %.synctex.gz, %.tex, $@)
|
||||
|
||||
libs: $(LIBS)
|
||||
|
||||
$(LIBS):
|
||||
ln -fs libs/$@ ./
|
||||
|
||||
clean-aux:
|
||||
rm -f $(addsuffix .aux, $(PROJECTNAME))
|
||||
rm -f $(addsuffix .log, $(PROJECTNAME))
|
||||
rm -f $(addsuffix .out, $(PROJECTNAME))
|
||||
rm -f $(addsuffix .toc, $(PROJECTNAME))
|
||||
|
||||
clean-libs:
|
||||
rm -f $(LIBS)
|
||||
|
||||
clean-tex:
|
||||
rm -f $(PDFS) $(SYNCTEXS)
|
||||
|
||||
clean: clean-aux clean-tex clean-libs
|
Reference in New Issue
Block a user