Extract the version number from NEWS if git-describe is not available.
[cumulus.git] / Makefile
index 0363f14..854be80 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,8 @@ OBJS=$(SRCS:.cc=.o)
 lbs : $(OBJS)
        $(CXX) $(LDFLAGS) -o $@ $^
 
-version :
-       (git-describe || echo "Unknown") >version
+version : NEWS
+       (git-describe || (head -n1 NEWS | cut -d" " -f1)) >version
 $(OBJS) : version
 
 clean :