Skip to content

Commit

Permalink
major: public master thesis
Browse files Browse the repository at this point in the history
  • Loading branch information
rememberYou committed May 25, 2022
1 parent 2ff7417 commit f46ed20
Show file tree
Hide file tree
Showing 111 changed files with 6,189 additions and 0 deletions.
71 changes: 71 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
NAME=master-thesis
LANG_ASPELL=en

IMG_DIR=img
SRC_DIR=src

MISC=Makefile

MAJOR_VERSION=0
MINOR_VERSION=1
VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)

UNAME=$(shell uname)

BIBTEX=bibtex
TEX=xelatex
TEX_FILES=$(wildcard $(SRC_DIR)/*.tex)
TEX_FLAGS=--shell-escape --synctex=1

all: $(NAME)

$(NAME):
@echo "** Compiling the \"$(NAME)\" file."
$(TEX) $(TEX_FLAGS) $(NAME)

check: $(addsuffix .spchk,$(basename $(TEX_FILES)))

%.spchk: %.tex
aspell -x -l $(LANG_ASPELL) -t -c $<

clean:
@echo "** Removing subsidiary TeX files."
$(RM) $(NAME).{aux,bbl,blg,lof,log,lom,lot,out,snm,tex.backup,nav,toc}

help:
@echo "make COMMAND"
@echo
@echo "COMMAND:"
@echo " all compile the \"$(NAME)\" file"
@echo " check check spelling of TeX files"
@echo " clean remove subsidiary TeX files"
@echo " help display available commands"
@echo " full compile the \"$(NAME)\" file and the bibliography"
@echo " open open the \"$(NAME)\" fileq"
@echo " tar create a tar archive"

full:
@echo "** Compiling the \"$(NAME)\" file and the bibliography."
$(TEX) $(TEX_FLAGS) $(NAME)
$(BIBTEX) $(NAME)
$(TEX) $(TEX_FLAGS) $(NAME)
$(TEX) $(TEX_FLAGS) $(NAME)

open:
ifeq ($(UNAME), Linux)
@echo "** Opening the \"$(NAME)\" file with evince."
evince $(NAME).pdf &
endif
ifeq ($(UNAME), Darwin)
@echo "** Opening the \"$(NAME)\" file with preview."
open $(NAME).pdf &
endif

tar:
@echo "** Creating the tar archive."
@mkdir -p $(NAME)-$(VERSION)
@cp -r $(SRC_DIR) $(IMG_DIR) $(MISC) $(NAME).tex $(NAME)-$(VERSION)
tar czvf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
$(RM) -r $(NAME)-$(VERSION)

.PHONY: all check clean help full open tar $(NAME)
Loading

0 comments on commit f46ed20

Please sign in to comment.