Last active
October 28, 2019 01:29
-
-
Save akafael/6283346 to your computer and use it in GitHub Desktop.
Makefile to use with Latex or Lualatex
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
## | |
# Makefile for Latex | |
# @author Rafael Lima | |
# @version 1.33 | |
## | |
# Compiler Options | |
CC = pdflatex | |
CCFLAGS = --enable-write18 | |
NAME = cursolatex | |
## | |
# Recipes: | |
## | |
.PHONY = ALL | |
ALL: $(NAME).pdf | |
# Compile Thrice to ensure all reference in the right place and open pdf | |
$(NAME).pdf: $(NAME).tex | |
$(CC) $(CCFLAGS) $< && $(CC) $< && $(CC) $< &&\ | |
xdg-open $(@)& | |
# Remove generated temporary files | |
.PHONY = clean-aux | |
clean-aux: | |
rm -f $(NAME).aux $(NAME).bbl $(NAME).blg $(NAME).log $(NAME).idx $(NAME).out\ | |
$(NAME).nav $(NAME).snm $(NAME).toc $(NAME).vrb | |
# Remove generated pdf | |
.PHONY = clean-pdf | |
clean-pdf: | |
rm -f ../$(NAME).pdf | |
# Remove All generated files | |
.PHONY = clean | |
clean: clean-aux clean-pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment