mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
lib: add a version string
Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
50417e961f
commit
38fffa8e27
8
include/crucible/version.h
Normal file
8
include/crucible/version.h
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#ifndef CRUCIBLE_VERSION_H
|
||||||
|
#define CRUCIBLE_VERSION_H
|
||||||
|
|
||||||
|
namespace crucible {
|
||||||
|
extern const char *VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif CRUCIBLE_VERSION_H
|
1
lib/.gitignore
vendored
Normal file
1
lib/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.version.*
|
@ -13,6 +13,7 @@ OBJS = \
|
|||||||
string.o \
|
string.o \
|
||||||
time.o \
|
time.o \
|
||||||
uuid.o \
|
uuid.o \
|
||||||
|
.version.o \
|
||||||
|
|
||||||
include ../makeflags
|
include ../makeflags
|
||||||
|
|
||||||
@ -21,6 +22,10 @@ depends.mk: *.c *.cc
|
|||||||
for x in *.cc; do $(CXX) $(CXXFLAGS) -M "$$x"; done >> depends.mk.new
|
for x in *.cc; do $(CXX) $(CXXFLAGS) -M "$$x"; done >> depends.mk.new
|
||||||
mv -fv depends.mk.new depends.mk
|
mv -fv depends.mk.new depends.mk
|
||||||
|
|
||||||
|
.version.cc: Makefile ../makeflags *.c *.cc ../include/crucible/*.h
|
||||||
|
echo "namespace crucible { const char *VERSION = \"$(shell git describe --always --dirty || echo UNKNOWN)\"; }" > .version.new.cc
|
||||||
|
mv -f .version.new.cc .version.cc
|
||||||
|
|
||||||
-include depends.mk
|
-include depends.mk
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
|
Loading…
x
Reference in New Issue
Block a user