Skip to content

Commit

Permalink
make snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ransford committed Mar 19, 2014
1 parent bf85ef5 commit 197d1b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile.include
Expand Up @@ -88,7 +88,7 @@ else ifneq ($(wildcard .svn/entries),)
endif

# .PHONY names all targets that aren't filenames
.PHONY: all clean pdf view
.PHONY: all clean pdf view snapshot

all: pdf $(AFTERALL)

Expand Down Expand Up @@ -128,6 +128,11 @@ endif
@while grep -q "Rerun to" $*.log; do \
$(PDFLATEX) $* $(ERRFILTER); done

DRAFTS := $(PDFTARGETS:.pdf=-$(REVISION).pdf)
$(DRAFTS): %-$(REVISION).pdf: %.pdf
cp $< $@
snapshot: $(DRAFTS)

clean:
$(RM) $(foreach T,$(PDFTARGETS:.pdf=), \
$(T).out $(T).pdf $(T).blg $(T).bbl \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -21,3 +21,5 @@ Features:
command you can use in your LaTeX markup to include a current revision
identifier. Useful for circulating drafts for comment.
* `make view` opens your typeset document.
* To generate a draft with the revision number in its filename (to pass
around), use `make snapshot`.

0 comments on commit 197d1b1

Please sign in to comment.