Skip to content
Snippets Groups Projects
Verified Commit f37d05b2 authored by Sankalp Gambhir's avatar Sankalp Gambhir
Browse files

Add Makefile, regenerate PDFs

parent 2e5a61a6
No related branches found
No related tags found
No related merge requests found
.PHONY = all clean
OUT_DIR ?= $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
DIRS := $(wildcard src/ex-??)
EXPDFS := $(patsubst src/ex-%,ex-%.pdf,$(DIRS))
SOLPDFS := $(patsubst src/ex-%,ex-%-sol.pdf,$(DIRS))
all: $(EXPDFS) $(SOLPDFS)
ex-%.pdf: src/ex-%/main.tex
cd src/ex-$* && \
lualatex -jobname=ex-$* "\def\ANSWERS{0}\input{main.tex}" && \
cp ex-$*.pdf $(OUT_DIR)/ex-$*.pdf
ex-%-sol.pdf: src/ex-%/main.tex
cd src/ex-$* && \
lualatex -jobname=ex-$*-sol "\def\ANSWERS{1}\input{main.tex}" && \
cp ex-$*-sol.pdf $(OUT_DIR)/ex-$*-sol.pdf
clean:
rm -f $(EXPDFS) $(SOLPDFS)
for d in $(DIRS); do \
cd $$d && rm -f *.aux *.log *.out main.pdf; \
done
No preview for this file type
No preview for this file type
......@@ -2,7 +2,9 @@
\input{../macro}
% \printanswers
\if\ANSWERS1
\printanswers
\fi
\title{CS 320 \\ Computer Language Processing\\Exercises: Weeks 1 and 2}
\author{}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment