Skip to content

Commit

Permalink
Add GNUmakefile to build a Zip of PDFs and release it to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
rrthomas committed May 27, 2017
1 parent 6c7dd99 commit 609f438
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@
*.tdo
hpmor-*.pdf
hpmor.pdf
hpmor*.zip
18 changes: 18 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Make a PDF release

PROJECT=hpmor

TAG := $(shell git describe --tags)
VERSION := $(shell echo $(TAG) | sed -e 's/^v//')
ZIPFILE = $(PROJECT)-$(VERSION).zip

all:
latexmk -g && \
rm -f $(ZIPFILE) && \
zip $(ZIPFILE) *.pdf

# To make a release: git tag vx.y && git push --tags && make release
# Needs woger from https://github.com/rrthomas/woger/
release: all
git diff --exit-code && \
woger github github_user=rjl20 package=$(PROJECT) version=$(VERSION) dist_type=zip github_dist_type=pdf
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,15 @@ and there are no appendices.
individual volumes `hpmor-N.tex`.
* `fonts/` - various fonts used
* `latexmkrc` - configures latexmk to run LaTeX to build the PDFs.
* `GNUMakefile` - contains targets to make a Zip of the PDFs and release them
to GitHub. (Mostly of interest to project maintainers.)


## Building the book(s)

* `latexmk`: Build all PDFs. (If in doubt, just run this command and do
something else for twenty minutes!)
* `make all`: Build a Zip of the PDFs.
* `latexmk hpmor`: Build the one-volume PDF `hpmor.pdf`
* `latexmk hpmor-N`: Build one of the six individual volumes
`hpmor-1.pdf` to `hpmor-6.pdf`.
Expand Down

0 comments on commit 609f438

Please sign in to comment.