about summary refs log tree commit homepage
path: root/GNUmakefile
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-11-26 14:58:41 -0800
committerEric Wong <normalperson@yhbt.net>2009-11-26 16:55:47 -0800
commit45db7aa7e9f00301332b019e1c033c7239c46ba2 (patch)
treeb0518393f858198f5b83a1c1367d07b0ac2a49f7 /GNUmakefile
parentf67dadaf65a788c05ba8cd517204e85ee2c57130 (diff)
downloadrainbows-45db7aa7e9f00301332b019e1c033c7239c46ba2.tar.gz
Don't show ChangeLog for unreleased things
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/GNUmakefile b/GNUmakefile
index d2c0c1c..105241a 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -65,9 +65,12 @@ NEWS: GIT-VERSION-FILE
         mv $@+ $@
 
 SINCE = 0.5.0
-ChangeLog: log_range = $(shell test -n "$(SINCE)" && echo v$(SINCE)..)
+ChangeLog: LOG_VERSION = \
+  $(shell git rev-parse -q "$(GIT_VERSION)" >/dev/null 2>&1 && \
+          echo $(GIT_VERSION) || git describe)
+ChangeLog: log_range = v$(SINCE)..$(LOG_VERSION)
 ChangeLog: GIT-VERSION-FILE
-        @echo "ChangeLog from $(GIT_URL) ($(SINCE)..$(GIT_VERSION))" > $@+
+        @echo "ChangeLog from $(GIT_URL) ($(log_range))" > $@+
         @echo >> $@+
         git log $(log_range) | sed -e 's/^/    /' >> $@+
         mv $@+ $@