Last active
November 4, 2017 20:45
-
-
Save stefan2904/16a88026d0ac1894a57949758ae69d2b to your computer and use it in GitHub Desktop.
This Makefile will generate a pdf named after the current folder.
This file contains hidden or 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
# Stefan's SPRING Makefile | |
# This Makefile will generate a pdf named after the current folder. | |
BASEFILE=presentation | |
TEXFILE=$(BASEFILE).tex | |
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) | |
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path)))) | |
TEXCMD=pdflatex | |
BIBCMD=biber | |
all: | |
$(TEXCMD) $(TEXFILE) | |
-mv $(BASEFILE).pdf ${current_dir}.pdf | |
full: clean | |
$(TEXCMD) $(TEXFILE) | |
$(TEXCMD) $(TEXFILE) | |
-mv $(BASEFILE).pdf ${current_dir}.pdf | |
clean: | |
@$(RM) *.blg | |
@$(RM) *.log | |
@$(RM) *.out | |
@$(RM) *.aux | |
@$(RM) *.run.xml | |
@$(RM) *.toc | |
@$(RM) *.nav | |
@$(RM) *.snm | |
@$(RM) *.vrb | |
cleanbib: | |
@$(RM) *.bbl | |
@$(RM) *.bst | |
@$(RM) *.bcf | |
cleanpdf: | |
@$(RM) *.pdf | |
cleanall: clean cleanbib cleanpdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment