-
-
Save kissge/3a45e426ea43edea5b1c to your computer and use it in GitHub Desktop.
Mac対応版
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.DEFAULT_GOAL := thesis.pdf | |
%.pdf: %.dvi | |
dvipdfmx $^ | |
thesis.dvi: thesis.tex refs.bib | |
platex -halt-on-error -shell-escape thesis.tex | |
bibtex thesis | |
platex -halt-on-error thesis.tex | |
platex -halt-on-error thesis.tex | |
abstract.tex: thesis.tex | |
ifeq ($(shell uname), Darwin) | |
nlinit=`echo 'nl="'; echo '"'`; \ | |
eval "$$nlinit"; \ | |
sed -e "/\maketitle/,\$$c\\$$nl\\\\maketitle\\$$nl\\\\end{document}" $< > $@ | |
else | |
sed -e '/\maketitle/,$$c \\\maketitle\n\\end{document}' $< > $@ | |
endif | |
abstract.dvi: abstract.tex | |
platex -halt-on-error $< | |
clean: | |
rm -rf *.aux *.bbl *.blg *.toc *.log *.xbb *.dvi *.pdf thesis.txt abstract.tex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://www.gnu.org/software/autoconf/manual/autoconf.html#Newlines-in-Make-Rules