Created
March 12, 2011 16:41
-
-
Save bagrow/867353 to your computer and use it in GitHub Desktop.
Compile and merge the latex cover letter, manuscript, and supporting info all at once
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
ENGINE = latexmk -pdf -silent -view=none | |
SOURCES = cover_letter paper paper_supp | |
MERGEFILE = paper_wCoverLetterSupp_$(shell date "+%Y%m%d").pdf | |
TEMPS = aux blg fdb_latexmk log out synctex.gz | |
MERGECMD= | |
ifneq ($(MERGEFILE),) | |
MERGECMD=gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$(MERGEFILE) $(SOURCES:=.pdf) | |
endif | |
all: | |
$(ENGINE) $(SOURCES) | |
$(MERGECMD) | |
force: | |
@$(ENGINE) -gg $(SOURCES) | |
$(MERGECMD) | |
count: | |
@texcount -sub $(SOURCES:=.tex) | |
clean: | |
@for a in $(TEMPS); do \ | |
rm -f $(SOURCES:=.$$a); \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment