Skip to content

Commit

Permalink
added dependencies.patch file
Browse files Browse the repository at this point in the history
  • Loading branch information
sifferman committed Sep 6, 2023
1 parent e5c2fe3 commit bf98d55
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 9 deletions.
23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@

BUILD_DIR := $(CURDIR)/build

PDFLATEX := TEXINPUTS=$(CURDIR):$(CURDIR)/src:$(CURDIR)/dependencies/ucsb/sty: \
PDFLATEX := TEXINPUTS=$(CURDIR):$(CURDIR)/src:${BUILD_DIR}/dependencies/ucsb/sty: \
pdflatex -interaction=nonstopmode -halt-on-error -output-directory ${BUILD_DIR}

BIBTEX := BSTINPUTS=$(CURDIR)/dependencies/ucsb: BIBINPUTS=$(CURDIR)/src: \
BIBTEX := BSTINPUTS=${BUILD_DIR}/dependencies/ucsb: BIBINPUTS=$(CURDIR)/src: \
bibtex

JUNK := *.pdf *.aux *.log *.bbl *.blg *.toc *.out *.fdb_latexmk *.fls *.synctex.gz

all: thesis

thesis:
.PHONY: all thesis patch clean

all: clean thesis

thesis: patch
mkdir -p ${BUILD_DIR}/final
mkdir -p ${BUILD_DIR}/chapters
$(PDFLATEX) thesis
${PDFLATEX} thesis
cd ${BUILD_DIR} && $(BIBTEX) thesis
$(PDFLATEX) thesis
$(PDFLATEX) thesis
${PDFLATEX} thesis
${PDFLATEX} thesis

patch: dependencies.patch
mkdir -p ${BUILD_DIR}
rm -rf ${BUILD_DIR}/dependencies
cp -ra dependencies ${BUILD_DIR}/dependencies
cd ${BUILD_DIR} && patch -p0 < ../dependencies.patch

clean:
rm -rf build
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,13 @@
sudo apt install texlive texlive-full
make
```

## Patch Instructions

Do not edit any files inside `"dependencies"` directly. Instead, all changes should be stored in `"dependencies.patch"`, which is applied during building. The following is how to update `"dependencies.patch"`.

```bash
make patch
# edit files in build/dependencies as desired
diff -Naur dependencies build/dependencies > dependencies.patch
```
18 changes: 18 additions & 0 deletions dependencies.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff -Naur dependencies/ucsb/sty/ucthesis-CA2012.cls build/dependencies/ucsb/sty/ucthesis-CA2012.cls
--- dependencies/ucsb/sty/ucthesis-CA2012.cls 2023-09-06 14:07:16.034801000 -0700
+++ build/dependencies/ucsb/sty/ucthesis-CA2012.cls 2023-09-06 14:12:03.413772500 -0700
@@ -206,12 +206,9 @@
\bigskip \medskip \vspace{6ex}
\fmfont {\bfseries \Large {\@title} \par} % Formatting of the Dissertation title
\bigskip \medskip \vspace{6ex}
- A dissertation submitted in partial satisfaction \par
+ A thesis submitted in partial satisfaction of the \par
\smallskip
- of the requirements for the degree \par
- \bigskip {\@degree} \par
- \smallskip in \par
- \smallskip {\@field} \par
+ requirements for the degree {\@degree} \par
\bigskip \medskip by \par
\bigskip \medskip {\@author} \par
\end{center}
7 changes: 5 additions & 2 deletions dependencies/ucsb/sty/ucthesis-CA2012.cls
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,12 @@
\bigskip \medskip \vspace{6ex}
\fmfont {\bfseries \Large {\@title} \par} % Formatting of the Dissertation title
\bigskip \medskip \vspace{6ex}
A thesis submitted in partial satisfaction of the \par
A dissertation submitted in partial satisfaction \par
\smallskip
requirements for the degree {\@degree} \par
of the requirements for the degree \par
\bigskip {\@degree} \par
\smallskip in \par
\smallskip {\@field} \par
\bigskip \medskip by \par
\bigskip \medskip {\@author} \par
\end{center}
Expand Down

0 comments on commit bf98d55

Please sign in to comment.