mirror of
https://github.com/soconnor0919/irb-application.git
synced 2026-02-04 15:56:31 -05:00
milestone 2 submission
This commit is contained in:
42
Makefile
Normal file
42
Makefile
Normal file
@@ -0,0 +1,42 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user