[latex] Makefile
# tex 파일에서 pdf 파일 생성
# 순서
# 1. pdftex
# 2. bibtex
# 3. pdftex
TEX2PDF = pdflatex
BIBTEX = bibtex
# 폴더에 있는 *.tex 파일 (예: a.tex b.tex 등)
TEXS = $(wildcard *.tex)
# *.tex 파일에서 확장자를 제외한 파일 이름 (예: a b 등)
TEX_FNS = $(patsubst %.tex,%,$(wildcard *.tex))
all: .make_pdf
.make_pdf: $(TEXS)
@echo "[$^]"
@for fn in $(TEX_FNS); do \
echo "[$$fn]" ; \
$(TEX2PDF) $$fn ; \
$(BIBTEX) $$fn; \
$(TEX2PDF) $$fn ; \
done;
@touch .make_pdf
.PHONY: clean
clean:
rm -f .make_pdf
rm -f *.pdf
rm -f *.aux
rm -f *.log
rm -f *.out
rm -f *.toc
# vim: sw=4 ts=4 autoindent
# 순서
# 1. pdftex
# 2. bibtex
# 3. pdftex
TEX2PDF = pdflatex
BIBTEX = bibtex
# 폴더에 있는 *.tex 파일 (예: a.tex b.tex 등)
TEXS = $(wildcard *.tex)
# *.tex 파일에서 확장자를 제외한 파일 이름 (예: a b 등)
TEX_FNS = $(patsubst %.tex,%,$(wildcard *.tex))
all: .make_pdf
.make_pdf: $(TEXS)
@echo "[$^]"
@for fn in $(TEX_FNS); do \
echo "[$$fn]" ; \
$(TEX2PDF) $$fn ; \
$(BIBTEX) $$fn; \
$(TEX2PDF) $$fn ; \
done;
@touch .make_pdf
.PHONY: clean
clean:
rm -f .make_pdf
rm -f *.pdf
rm -f *.aux
rm -f *.log
rm -f *.out
rm -f *.toc
# vim: sw=4 ts=4 autoindent
댓글