Skip to content

Commit 2eee9ca

Browse files
committed
Makefile readability, switch to PDF/A-1 for archival purposes
1 parent 327e4eb commit 2eee9ca

4 files changed

+37
-11
lines changed

Makefile

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,23 @@
1-
.PHONY: build clean help
1+
# standard arguments used in all ghostscript commands
2+
PDF_ARGS=-sDEVICE=pdfwrite\
3+
-dPDFA=1\
4+
-sPDFACompatibilityPolicy=1\
5+
-sColorConversionStrategy=RGB\
6+
-sProcessColorModel=DeviceRGB\
7+
-dNOPAUSE\
8+
-dQUIET\
9+
-dBATCH
10+
11+
# these will be optimized for "screen"
12+
PDFS=ref/Intel\ Chips\ timeline.pdf\
13+
ref/Intel\ 8085.pdf\
14+
ref/MOS\ 6510.pdf
15+
16+
# these need special treatment
17+
SPECIAL_PDFS=ref/Hitachi\ HD64180\ Hardware\ Manual\ 4th\ Edition.pdf\
18+
ref/MOS\ MCS6500.pdf
19+
20+
.PHONY: build clean help pdfs
221

322
build: src/cpu-bitness.pdf ## Build the PDF document (default).
423

@@ -8,22 +27,29 @@ src/cpu-bitness.pdf: src/cpu-bitness.tex src/.cache/Tectonic
827
src/.cache/Tectonic:
928
mkdir -p src/.cache/Tectonic
1029

11-
ref: ref/Hitachi\ HD64180\ Hardware\ Manual\ 4th\ Edition.pdf ref/Intel\ Chips\ timeline.pdf ref/Intel\ 8085.pdf ## Create screen optimized PDFs of original reference material
30+
ref: pdfs ## Create screen optimized PDFs of original reference material
31+
32+
pdfs: $(PDFS) $(SPECIAL_PDFS)
1233

1334
ref/Hitachi\ HD64180\ Hardware\ Manual\ 4th\ Edition.pdf: ref/originals/HD64180Z\ Hardware\ Manual\ 4th\ Edition.pdf
14-
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -dFirstPage=2 -dLastPage=2 -sOutputFile=/tmp/HD64180-1.pdf "$<"
15-
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -dFirstPage=18 -dLastPage=18 -sOutputFile=/tmp/HD64180-2.pdf "$<"
16-
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -dFirstPage=51 -dLastPage=57 -sOutputFile=/tmp/HD64180-3.pdf "$<"
17-
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -dFirstPage=173 -dLastPage=182 -sOutputFile=/tmp/HD64180-4.pdf "$<"
18-
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -dFirstPage=220 -dLastPage=220 -sOutputFile=/tmp/HD64180-5.pdf "$<"
19-
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$@" /tmp/HD64180-?.pdf
35+
gs $(PDF_ARGS) -dPDFSETTINGS=/screen -dFirstPage=2 -dLastPage=2 -sOutputFile=/tmp/HD64180-1.pdf "$<"
36+
gs $(PDF_ARGS) -dPDFSETTINGS=/screen -dFirstPage=18 -dLastPage=18 -sOutputFile=/tmp/HD64180-2.pdf "$<"
37+
gs $(PDF_ARGS) -dPDFSETTINGS=/screen -dFirstPage=51 -dLastPage=57 -sOutputFile=/tmp/HD64180-3.pdf "$<"
38+
gs $(PDF_ARGS) -dPDFSETTINGS=/screen -dFirstPage=173 -dLastPage=182 -sOutputFile=/tmp/HD64180-4.pdf "$<"
39+
gs $(PDF_ARGS) -dPDFSETTINGS=/screen -dFirstPage=220 -dLastPage=220 -sOutputFile=/tmp/HD64180-5.pdf "$<"
40+
gs $(PDF_ARGS) -sOutputFile="$@" /tmp/HD64180-?.pdf
2041
rm /tmp/HD64180-?.pdf
2142

2243
ref/Intel\ Chips\ timeline.pdf: ref/originals/Intel\ Chips\ timeline.pdf
23-
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.6 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$@" "$<"
24-
2544
ref/Intel\ 8085.pdf: ref/originals/Intel\ 8085.pdf
26-
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.3 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$@" "$<"
45+
ref/MOS\ 6510.pdf: ref/originals/MOS\ 6510.pdf
46+
47+
# doesn't contain OCR information and illegible with "screen" optimization
48+
ref/MOS\ MCS6500.pdf: ref/originals/MOS\ MCS6500.pdf
49+
gs $(PDF_ARGS) -dPDFSETTINGS=/ebook -sOutputFile="$@" "$<"
50+
51+
$(PDFS):
52+
gs $(PDF_ARGS) -dPDFSETTINGS=/screen -sOutputFile="$@" "$<"
2753

2854
clean: ## Removes the generated PDF and Tectonic cache.
2955
rm -rf src/cpu-bitness.pdf .cache
Binary file not shown.

ref/Intel 8085.pdf

1.55 KB
Binary file not shown.

ref/Intel Chips timeline.pdf

-406 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)