summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-02-14 17:38:16 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-02-14 17:38:16 -0500
commit6bb99d8fa7fce2504bf5d5a57629db6b9f5babba (patch)
treebcdc69da3805ff03cf6f7083b3dea1ff602026ce
parent9cba8770a2f08457735556b480164fcea2853de8 (diff)
downloadbfs-0.67.tar.xz
Set the version to 0.67.0.67
For now, version numbers are the fraction of GNU find features supported.
-rw-r--r--Makefile8
-rw-r--r--bfs.h9
2 files changed, 14 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 02f6554..c98a51e 100644
--- a/Makefile
+++ b/Makefile
@@ -9,13 +9,19 @@
# the COPYING file or http://www.wtfpl.net/ for more details. #
#####################################################################
+ifeq ($(wildcard .git),)
+VERSION := 0.67
+else
+VERSION := $(shell git describe --always)
+endif
+
CC ?= gcc
CFLAGS ?= -g -Wall
LDFLAGS ?=
DEPFLAGS ?= -MD -MP -MF $(@:.o=.d)
RM ?= rm -f
-LOCAL_CPPFLAGS := -D_DEFAULT_SOURCE -D_GNU_SOURCE
+LOCAL_CPPFLAGS := -D_DEFAULT_SOURCE -D_GNU_SOURCE -DBFS_VERSION=\"$(VERSION)\"
LOCAL_CFLAGS := -std=c99
ALL_CPPFLAGS = $(LOCAL_CPPFLAGS) $(CPPFLAGS)
diff --git a/bfs.h b/bfs.h
index b031eb1..c9b248d 100644
--- a/bfs.h
+++ b/bfs.h
@@ -18,8 +18,13 @@
#include <sys/types.h>
#include <time.h>
-#define BFS_VERSION "0.0"
-#define BFS_HOMEPAGE "https://github.com/tavianator/bfs"
+#ifndef BFS_VERSION
+# define BFS_VERSION "0.67"
+#endif
+
+#ifndef BFS_HOMEPAGE
+# define BFS_HOMEPAGE "https://github.com/tavianator/bfs"
+#endif
/**
* A command line expression.