diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-07 12:51:41 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-07 12:51:41 +0000 |
commit | 84f817704ce4a111e0a128543036d1d828f9d781 (patch) | |
tree | 9a522d50e8e874e7d734834dd359c8563cfd91ac | |
parent | fad2796977c093521e6a75e70356f0a2daa6c532 (diff) | |
download | lua-openrc-84f817704ce4a111e0a128543036d1d828f9d781.tar.bz2 lua-openrc-84f817704ce4a111e0a128543036d1d828f9d781.tar.xz |
use git tag in versionv0.1
-rw-r--r-- | Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,12 +1,21 @@ VERSION = 0.1 +GIT_REV := $(shell test -d .git && git describe || echo exported) +ifneq ($(GIT_REV), exported) +FULL_VERSION := $(GIT_REV) +FULL_VERSION := $(patsubst v%,%,$(FULL_VERSION)) +else +FULL_VERSION := $(VERSION) +endif + + OBJS = rc.o LIBS = -lrc DEBUGFLAGS = -g -Wall -Werror CFLAGS += $(DEBUGFLAGS) -CFLAGS += -DVERSION=\"$(VERSION)\" +CFLAGS += -DVERSION=\"$(FULL_VERSION)\" LDFLAGS += -L/lib |