Bumped version to 1.0.1

This commit is contained in:
Bob Polis 2025-01-08 13:13:43 +01:00
parent 259117bad5
commit aaccb1c70d
3 changed files with 8 additions and 7 deletions

View File

@ -2,8 +2,8 @@ include premake.make
# git commit hash and version for this build
COMMIT-HASH != git log 2>/dev/null | sed -e '1s/^commit //;q'
COMMIT := "const char* commit = \"$(COMMIT-HASH)\";"
VERSION := "const char* version = \"$(MAJOR).$(MINOR).$(PATCH)\";"
COMMIT := "static const char* commit = \"$(COMMIT-HASH)\";"
VERSION := "static const char* version = \"$(MAJOR).$(MINOR).$(PATCH)\";"
# some important install locations
PREFIX ?= /usr/local
@ -53,7 +53,7 @@ BIN := $(OUTDIR)/$(PROJ)
SRCS += $(notdir $(wildcard src/*.cpp))
OBJS := $(addprefix $(BUILDDIR)/, $(SRCS:.cpp=.o))
DEPS := $(addprefix $(BUILDDIR)/, $(SRCS:.cpp=.dep))
HDRS ?= $(wildcard src/*.hpp)
HDRS ?= $(filter-out src/precomp.hpp, $(wildcard src/*.hpp))
MANS := $(addprefix $(PREFIX)/, $(wildcard man/man*/*))
# if project supports plugins, link to libdl where needed
@ -126,7 +126,8 @@ else
$(OUTDIR)/$(REALNAME): $(OBJS)
endif
ifeq ($(UNAME_S),Darwin)
$(CXX) -dynamiclib -o $(OUTDIR)/$(REALNAME) -current_version $(MAJOR) -compatibility_version $(MINOR) $(LDFLAGS) $(OBJS) $(LDLIBS)
$(CXX) -dynamiclib -o $(OUTDIR)/$(REALNAME) -install_name $(LIBDIR)/$(REALNAME) \
-current_version $(MAJOR) -compatibility_version $(MINOR) $(LDFLAGS) $(OBJS) $(LDLIBS)
else ifeq ($(UNAME_S),OpenBSD)
$(CXX) -g -shared -Wl,-soname,$(REALNAME) -o $(OUTDIR)/$(REALNAME) $(LDFLAGS) $(OBJS) $(LDLIBS)
else ifeq ($(UNAME_S),Linux)

View File

@ -13,7 +13,7 @@ PRODUCT := tool
# Single source of truth for version.
MAJOR := 1
MINOR := 0
PATCH := 0
PATCH := 1
# Specify desired C++ standard for this project.
CXXFLAGS += -std=c++20

View File

@ -1,9 +1,9 @@
#include "version.hpp"
#include "version.inc"
#include "commit.inc"
#include <sstream>
std::string valid_utf8_version() {
#include "version.inc"
#include "commit.inc"
std::ostringstream oss;
oss << "valid-utf8 version " << version;
#ifdef DEBUG