Skip to content

Commit e53858c

Browse files
committed
update VERSION variables in makefiles
VERSION is now VERSION_PC the new VERSION contains the entire string of SCRYPT
1 parent a8965f0 commit e53858c

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

helper.pl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,10 @@ sub patch_makefile {
274274
return $content;
275275
}
276276

277-
sub version_form_tomcrypt_h {
277+
sub version_from_tomcrypt_h {
278278
my $h = read_file(shift);
279-
if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)\.([0-9]+).*"/s) {
280-
return "VERSION=$1.$2.$3", "VERSION_LT=0:$1$2";
279+
if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)\.([0-9]+)(.*)"/s) {
280+
return "VERSION_PC=$1.$2.$3", "VERSION_LT=0:$1$2", "VERSION=$1.$2.$3$4";
281281
}
282282
else {
283283
die "#define SCRYPT not found in tomcrypt.h";
@@ -304,7 +304,7 @@ sub process_makefiles {
304304
my $var_to = prepare_variable("TOBJECTS", sort map { my $x = $_; $x =~ s/\.c$/.o/; $x } @t);
305305
(my $var_tobj = $var_to) =~ s/\.o\b/.obj/sg;
306306

307-
my @ver_version = version_form_tomcrypt_h("src/headers/tomcrypt.h");
307+
my @ver_version = version_from_tomcrypt_h("src/headers/tomcrypt.h");
308308

309309
# update MSVC project files
310310
my $msvc_files = prepare_msvc_files_xml(\@all, qr/tab\.c$/, ['Debug|Win32', 'Release|Win32', 'Debug|x64', 'Release|x64']);

makefile.mingw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ EXTRALIBS = -L../libtommath -ltommath
2727
#Compilation flags
2828
LTC_CFLAGS = $(CFLAGS) -Isrc/headers -Itests -DLTC_SOURCE
2929
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
30-
VERSION=1.18.0
30+
VERSION=1.18.0-rc1
3131

3232
#Libraries to be created
3333
LIBMAIN_S =libtomcrypt.a

makefile.msvc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ EXTRALIBS = ../libtommath/tommath.lib
2222
#Compilation flags
2323
LTC_CFLAGS = $(CFLAGS) /nologo /Isrc/headers/ /Itests/ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /DLTC_SOURCE /W3
2424
LTC_LDFLAGS = advapi32.lib $(EXTRALIBS)
25-
VERSION=1.18.0
25+
VERSION=1.18.0-rc1
2626

2727
#Libraries to be created (this makefile builds only static libraries)
2828
LIBMAIN_S =tomcrypt.lib

makefile.shared

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $(LIBNAME): $(OBJECTS)
4646
$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `find ./src -type f -name "*.lo" | LC_ALL=C sort` $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT)
4747

4848
install: .common_install
49-
sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > libtomcrypt.pc
49+
sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtomcrypt.pc.in > libtomcrypt.pc
5050
install -d $(DESTDIR)$(LIBPATH)/pkgconfig
5151
install -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
5252

makefile.unix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ EXTRALIBS = ../libtommath/libtommath.a
3939
#Compilation flags
4040
LTC_CFLAGS = $(CFLAGS) -Isrc/headers -Itests -DLTC_SOURCE
4141
LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
42-
VERSION=1.18.0
42+
VERSION=1.18.0-rc1
4343

4444
#Libraries to be created (this makefile builds only static libraries)
4545
LIBMAIN_S =libtomcrypt.a

makefile_include.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# Include makefile used by makefile + makefile.shared
33
# (GNU make only)
44

5-
# The version - BEWARE: VERSION and VERSION_LT are updated via ./updatemakes.sh
6-
VERSION=1.18.0
5+
# The version - BEWARE: VERSION, VERSION_PC and VERSION_LT are updated via ./updatemakes.sh
6+
VERSION=1.18.0-rc1
7+
VERSION_PC=1.18.0
78
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
89
VERSION_LT=0:118
910

0 commit comments

Comments
 (0)