dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

Makefile (634B)


      1 LMK_AUXDIR=build
      2 MAINFILE=src/main.tex
      3 PDFNAME=output.pdf
      4 
      5 LMK_FLAGS=-bibtex -cd -auxdir=$(LMK_AUXDIR) -outdir=$(LMK_AUXDIR)
      6 SRCFILES=$(wildcard $(dir $(MAINFILE))*.tex)
      7 OUTPDF=$(dir $(MAINFILE))$(LMK_AUXDIR)/$(notdir $(basename $(MAINFILE))).pdf
      8 
      9 .PHONY: all clean cleanall open
     10 
     11 all: $(PDFNAME)
     12 
     13 open: $(PDFNAME)
     14 	@open $(PDFNAME) || xdg-open $(PDFNAME) || echo "Don't know how to open."
     15 
     16 
     17 $(PDFNAME): $(OUTPDF)
     18 	mv $(OUTPDF) ./$(PDFNAME)
     19 
     20 $(OUTPDF): $(SRCFILES)
     21 	latexmk $(LMK_FLAGS) -pdf $(MAINFILE)
     22 
     23 clean:
     24 	latexmk $(LMK_FLAGS) -c $(MAINFILE)
     25 
     26 cleanall:
     27 	latexmk $(LMK_FLAGS) -C $(MAINFILE)
     28 	rm ./src/numbers/*
     29 	rm ./$(PDFNAME)