Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BASEDIR = .
- TEXDIR = $(BASEDIR)/tex
- PDFDIR = $(BASEDIR)/pdf
- SRCS = $(shell find . ! -name "abstract.rst" ! -name "conclusion.rst" -name "*.rst" -printf "%f\n" | awk -F. '{ print $$1 }')
- PDF_SRCS = $(foreach src,$(SRCS),$(PDFDIR)/$(src).pdf)
- all: $(PDF_SRCS) clean
- recompile_all: abstract.rst
- @for src in $(SRCS); do \
- rst2latex.py $(BASEDIR)/$$src.rst $(TEXDIR)/$$src.tex; \
- pdflatex -output-directory=$(PDFDIR) $(TEXDIR)/$$src.tex; \
- done;
- $(PDFDIR)/%.pdf: $(BASEDIR)/%.rst
- rst2latex.py $(BASEDIR)/$*.rst $(TEXDIR)/$*.tex
- pdflatex -output-directory=$(PDFDIR) $(TEXDIR)/$*.tex
- clean:
- rm -f $(PDFDIR)/*.log $(PDFDIR)/*.bak $(PDFDIR)/*.aux \
- $(PDFDIR)/*.bbl $(PDFDIR)/*.blg $(PDFDIR)/*.idx \
- $(PDFDIR)/*.toc $(PDFDIR)/*.out $(PDFDIR)/*~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement