chiark
/
gitweb
/
~ian
/
topbloke-formulae.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
revid - better deps
[topbloke-formulae.git]
/
Makefile
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
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 $@
./$< >$@.new
cmp $@.new $@ || mv -f $@.new $@
-final.pdf: $(SRCS)
+final.pdf: $(SRCS)
revid.inc
$(MAKE) once
$(MAKE) once
$(MAKE) once
$(MAKE) once
$(MAKE) once
$(MAKE) once