mirror of
https://github.com/soconnor0919/irb-application.git
synced 2026-02-05 00:06:36 -05:00
43 lines
912 B
Makefile
43 lines
912 B
Makefile
# Makefile for IRB Application
|
|
|
|
# Tools
|
|
LATEXMk = latexmk
|
|
PDFLATEX = pdflatex
|
|
|
|
# Directories
|
|
BUILD_DIR = build
|
|
OUT_DIR = out
|
|
APPENDIX_DIR = appendices
|
|
|
|
# Files
|
|
MAIN_SRC = irbapplication.tex
|
|
APPENDICES_SRC = $(wildcard $(APPENDIX_DIR)/*.tex)
|
|
|
|
# Targets
|
|
all: main appendices
|
|
|
|
# Build main application
|
|
main: $(MAIN_SRC)
|
|
mkdir -p $(BUILD_DIR) $(OUT_DIR)
|
|
$(PDFLATEX) -output-directory=$(BUILD_DIR) $(MAIN_SRC)
|
|
mv $(BUILD_DIR)/irbapplication.pdf $(OUT_DIR)/
|
|
|
|
# Build appendices
|
|
appendices: $(APPENDICES_SRC)
|
|
mkdir -p $(BUILD_DIR) $(OUT_DIR)
|
|
for file in $(APPENDICES_SRC); do \
|
|
$(PDFLATEX) -output-directory=$(BUILD_DIR) $$file; \
|
|
mv $(BUILD_DIR)/*.pdf $(OUT_DIR)/; \
|
|
done
|
|
|
|
# Clean build artifacts
|
|
clean:
|
|
rm -rf $(BUILD_DIR)
|
|
rm -f *.aux *.log *.out *.toc *.synctex.gz *.fls *.fdb_latexmk
|
|
|
|
# Clean strictly (remove output too)
|
|
distclean: clean
|
|
rm -rf $(OUT_DIR)
|
|
|
|
.PHONY: all main appendices clean distclean
|