SRC_DIR = LaTeX/ THESIS_SRC_NAMES = thesis.tex thesis.bib approach.tex conclusion.tex introduction.tex \ results.tex trajectory_design.tex trajectory_optimization.tex THESIS_SRC = $(addprefix $(SRC_DIR)/,$(THESIS_SRC_NAMES)) THESIS_PRES_SRC_NAMES = presentation.tex presentation.bib THESIS_PRES_SRC = $(addprefix $(SRC_DIR)/,$(THESIS_PRES_SRC_NAMES)) THESIS_PRES = presentation.pdf THESIS_PDF = thesis.pdf BUILD_DIR = temp/ all: $(THESIS_PDF) $(THESIS_PRES) $(BUILD_DIR): mkdir -p $(BUILD_DIR) $(BUILD_DIR)/$(THESIS_PDF): $(BUILD_DIR) $(THESIS_SRC) xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/thesis bibtex $(BUILD_DIR)/thesis xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/thesis xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/thesis $(BUILD_DIR)/$(THESIS_PRES): $(BUILD_DIR) $(THESIS_PRES_SRC) xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/presentation bibtex $(BUILD_DIR)/presentation xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/presentation xelatex --output-directory $(BUILD_DIR) $(SRC_DIR)/presentation $(THESIS_PDF): $(BUILD_DIR)/$(THESIS_PDF) cp $(BUILD_DIR)/thesis.pdf . $(THESIS_PRES): $(BUILD_DIR)/$(THESIS_PRES) cp $(BUILD_DIR)/presentation.pdf . .PHONY: clean revise clean: rm -rf $(THESIS_PDF) rm -rf $(THESIS_PRES) rm -rf $(BUILD_DIR) final: $(THESIS_PDF) $(THESIS_PRES) rm -rf $(BUILD_DIR)