Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
c260fccd
Commit
c260fccd
authored
Nov 17, 2020
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
versioning
parent
d9bf7c94
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
8 deletions
+57
-8
.gitignore
+0
-3
GNUmakefile.in
+33
-2
configure
+10
-0
configure.ac
+7
-1
src/CifUtils.cpp
+7
-2
No files found.
.gitignore
View file @
c260fccd
...
...
@@ -13,7 +13,4 @@ libcifpp.la
config.status
config.log
libtool
rsrc/lib-version.txt
version-info*.txt
src/revision.hpp
test/pdb2cif-test
GNUmakefile.in
View file @
c260fccd
...
...
@@ -64,8 +64,8 @@ LIB_NAME = @PACKAGE_NAME@
LIB_VERSION
=
@LIBCIF_LT_VERSION@
LIB_CURRENT
=
@LIBCIF_LT_CURRENT@
LIB_TARGET
=
$(LIB_NAME)
.la
VERSION
=
@
PACKAGE
_VERSION@
DIST_NAME
=
@PACKAGE_NAME@-
$
(
subst :,.,
$(
LIB_
VERSION)
)
VERSION
=
@
LIBCIF_SEMANTIC
_VERSION@
DIST_NAME
=
@PACKAGE_NAME@-
$
(
subst :,.,
$(VERSION)
)
# libtool stuff
...
...
@@ -133,6 +133,37 @@ $(OBJDIR)/Symmetry.lo: src/SymOpTable_data.cpp
endif
# We have development releases and official releases, for each we
# maintain different versioning schemes.
ifneq
"x@UPDATE_REVISION@"
"x"
REVISION
=
$(
shell
git log
--pretty
=
format:%h
--max-count
=
1
)
REVISION_FILE
=
version-info-
$(REVISION)
.txt
$(REVISION_FILE)
:
rm
-f
version-info-
*
.txt
@
echo
libcifpp-version:
$(VERSION)
>
$@
@
git describe
--match
=
build
--dirty
>>
$@
@
git log
--pretty
=
medium
--date
=
iso8601
-1
>>
$@
src/revision.hpp
:
$(REVISION_FILE)
@
echo
'const char kRevision[] = R"('
>
$@
@
cat
$?
>>
$@
@
echo
')";'
>>
$@
else
src/revision.hpp
:
@
echo
'const char kRevision[] = R"('
>
$@
@
echo
libcifpp-version:
$(VERSION)
>>
$@
@
echo
')";'
>>
$@
endif
$(OBJDIR)/CifUtils.o
:
src/revision.hpp
$(OBJDIR)/CifUtils.lo
:
src/revision.hpp
$(LIB_TARGET)
:
$(OBJECTS)
$(CXXLINK)
-rpath
$(libdir)
$(OBJECTS)
$(LIBS)
...
...
configure
View file @
c260fccd
...
...
@@ -646,7 +646,9 @@ BOOST_CPPFLAGS
SET_MAKE
PKG_CONFIG
CCP4
UPDATE_REVISION
DEBUG
LIBCIF_SEMANTIC_VERSION
LIBCIF_LT_VERSION
LIBCIF_LT_CURRENT
LIBTOOL_DEPS
...
...
@@ -766,6 +768,7 @@ CC
CFLAGS
LT_SYS_LIBRARY_PATH
DEBUG
UPDATE_REVISION
CCP4
LIBZ_CPPFLAGS
LIBZ_LDFLAGS
...
...
@@ -1446,6 +1449,8 @@ Some influential environment variables:
LT_SYS_LIBRARY_PATH
User-defined run-time library search path.
DEBUG Build a debug version of the library
UPDATE_REVISION
Update the revision.hpp file
CCP4 The location where CCP4 is installed
LIBZ_CPPFLAGS
C preprocessor flags for LIBZ headers
...
...
@@ -16081,6 +16086,11 @@ LIBCIF_LT_VERSION="${LIBCIF_CURRENT}:${LIBCIF_REVISION}:${LIBCIF_AGE}"
LIBCIF_SEMANTIC_VERSION
=
1.0.0
...
...
configure.ac
View file @
c260fccd
...
...
@@ -57,7 +57,7 @@ dnl LT_INIT([disable-shared])
LT_INIT
AC_SUBST(LIBTOOL_DEPS)
dnl versioning
dnl versioning
, first for libtool
LIBCIF_CURRENT=1
LIBCIF_REVISION=0
LIBCIF_AGE=0
...
...
@@ -68,8 +68,14 @@ LIBCIF_LT_VERSION="${LIBCIF_CURRENT}:${LIBCIF_REVISION}:${LIBCIF_AGE}"
AC_SUBST(LIBCIF_LT_CURRENT)
AC_SUBST(LIBCIF_LT_VERSION)
dnl and now for the semantic version
LIBCIF_SEMANTIC_VERSION=1.0.0
AC_SUBST(LIBCIF_SEMANTIC_VERSION)
AC_ARG_VAR([DEBUG], [Build a debug version of the library])
AC_ARG_VAR([UPDATE_REVISION], [Update the revision.hpp file])
AC_ARG_VAR([CCP4], [The location where CCP4 is installed])
AC_PATH_PROG([PKG_CONFIG], [pkg-config])
...
...
src/CifUtils.cpp
View file @
c260fccd
...
...
@@ -64,7 +64,8 @@ extern int VERBOSE;
std
::
string
get_version_nr
()
{
const
std
::
regex
rxVersionNr
(
R"(build-(\d+)-g[0-9a-f]{7}(-dirty)?)"
);
rxVersionNr1
(
R"(build-(\d+)-g[0-9a-f]{7}(-dirty)?)"
),
rxVersionNr2
(
R"(libcifpp-version: (\d+\.\d+\.\d+))"
);
#include "revision.hpp"
...
...
@@ -81,13 +82,17 @@ std::string get_version_nr()
{
std
::
smatch
m
;
if
(
std
::
regex_match
(
line
,
m
,
rxVersionNr
))
if
(
std
::
regex_match
(
line
,
m
,
rxVersionNr
1
))
{
result
=
m
[
1
];
if
(
m
[
2
].
matched
)
result
+=
'*'
;
break
;
}
// always the first, replace with more specific if followed by the other info
if
(
std
::
regex_match
(
line
,
m
,
rxVersionNr2
))
result
=
m
[
1
];
}
return
result
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment