LaTeX-Templates/Paper With Citations/Makefile

36 lines
949 B
Makefile

# Written by joe
REVISION := "$(shell git describe --abbrev=8 --dirty --always --tags)"
all: pdf submit
# Move all files to the build dir
copy:
mkdir -p _build
find -type f '(' -name "*.tex*" -o -name "*.sty*" -o -name "*.bib" ')' -exec cp {} _build \;
pdf: copy
cd _build && find . -name '*.tex' -exec latexmk --shell-escape -pdf {} \;
submit: pdf
rm -rvf brightspace
mkdir -p brightspace
find -type f '(' -name "*.tex*" -o -name "*.sty*" -o -name "*.bib" ')' -exec cp {} brightspace \;
cd brightspace && zip $(REVISION)_source.zip *
cp _build/*.pdf brightspace
echo "Auto generated using software written by Joe." > brightspace/README.md
echo "This build and all artifacts were built locally on this date: " >> brightspace/README.md
date >> brightspace/README.md
# cleanup
cd brightspace && find -type f '(' -name "*.tex*" -o -name "*.sty*" -o -name "*.bib" ')' -exec rm {} \;
clean:
git clean -fdX
rm -rvf brightspace