chiark
/
gitweb
/
~ian
/
topbloke-formulae.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb8b213
)
revid - better deps
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 18 Mar 2012 11:29:20 +0000
(11:29 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 18 Mar 2012 11:42:19 +0000
(11:42 +0000)
Makefile
patch
|
blob
|
history
diff --git
a/Makefile
b/Makefile
index 2e4d97defcf6bab0e0ec6f1ec454d22107ae211e..88cfc3b873c973fdd36bab1232b5e6de80edb954 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-6,11
+6,15
@@
default: final.pdf
once: revid.inc
pdflatex -halt-on-error article.tex </dev/null
-revid.inc: .git-revid $(SRCS) Makefile
+GITDIR:=$(addsuffix /, $(shell git rev-parse --git-dir))
+HEADREF:=$(shell git symbolic-ref HEAD 2>/dev/null)
+HEADDEPS:=$(addprefix $(GITDIR), HEAD $(HEADREF))
+
+revid.inc: .git-revid $(SRCS) Makefile $(HEADDEPS)
./$< >$@.new
cmp $@.new $@ || mv -f $@.new $@
-final.pdf: $(SRCS)
+final.pdf: $(SRCS)
revid.inc
$(MAKE) once
$(MAKE) once
$(MAKE) once