Browse Source

update VERSION variables in makefiles

VERSION is now VERSION_PC
the new VERSION contains the entire string of SCRYPT
Steffen Jaeckel 8 years ago
parent
commit
e53858c740
6 changed files with 11 additions and 10 deletions
  1. 4 4
      helper.pl
  2. 1 1
      makefile.mingw
  3. 1 1
      makefile.msvc
  4. 1 1
      makefile.shared
  5. 1 1
      makefile.unix
  6. 3 2
      makefile_include.mk

+ 4 - 4
helper.pl

@@ -274,10 +274,10 @@ sub patch_makefile {
   return $content;
 }
 
-sub version_form_tomcrypt_h {
+sub version_from_tomcrypt_h {
   my $h = read_file(shift);
-  if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)\.([0-9]+).*"/s) {
-    return "VERSION=$1.$2.$3", "VERSION_LT=0:$1$2";
+  if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)\.([0-9]+)(.*)"/s) {
+    return "VERSION_PC=$1.$2.$3", "VERSION_LT=0:$1$2", "VERSION=$1.$2.$3$4";
   }
   else {
     die "#define SCRYPT not found in tomcrypt.h";
@@ -304,7 +304,7 @@ sub process_makefiles {
   my $var_to = prepare_variable("TOBJECTS", sort map { my $x = $_; $x =~ s/\.c$/.o/; $x } @t);
   (my $var_tobj = $var_to) =~ s/\.o\b/.obj/sg;
 
-  my @ver_version = version_form_tomcrypt_h("src/headers/tomcrypt.h");
+  my @ver_version = version_from_tomcrypt_h("src/headers/tomcrypt.h");
 
   # update MSVC project files
   my $msvc_files = prepare_msvc_files_xml(\@all, qr/tab\.c$/, ['Debug|Win32', 'Release|Win32', 'Debug|x64', 'Release|x64']);

+ 1 - 1
makefile.mingw

@@ -27,7 +27,7 @@ EXTRALIBS = -L../libtommath -ltommath
 #Compilation flags
 LTC_CFLAGS  = $(CFLAGS) -Isrc/headers -Itests -DLTC_SOURCE
 LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
-VERSION=1.18.0
+VERSION=1.18.0-rc1
 
 #Libraries to be created
 LIBMAIN_S =libtomcrypt.a

+ 1 - 1
makefile.msvc

@@ -22,7 +22,7 @@ EXTRALIBS = ../libtommath/tommath.lib
 #Compilation flags
 LTC_CFLAGS  = $(CFLAGS) /nologo /Isrc/headers/ /Itests/ /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /DLTC_SOURCE /W3
 LTC_LDFLAGS = advapi32.lib $(EXTRALIBS)
-VERSION=1.18.0
+VERSION=1.18.0-rc1
 
 #Libraries to be created (this makefile builds only static libraries)
 LIBMAIN_S =tomcrypt.lib

+ 1 - 1
makefile.shared

@@ -46,7 +46,7 @@ $(LIBNAME): $(OBJECTS)
 	$(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)
 
 install: .common_install
-	sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > libtomcrypt.pc
+	sed -e 's,^prefix=.*,prefix=$(PREFIX),' -e 's,^Version:.*,Version: $(VERSION_PC),' libtomcrypt.pc.in > libtomcrypt.pc
 	install -d $(DESTDIR)$(LIBPATH)/pkgconfig
 	install -m 644 libtomcrypt.pc $(DESTDIR)$(LIBPATH)/pkgconfig/
 

+ 1 - 1
makefile.unix

@@ -39,7 +39,7 @@ EXTRALIBS = ../libtommath/libtommath.a
 #Compilation flags
 LTC_CFLAGS  = $(CFLAGS) -Isrc/headers -Itests -DLTC_SOURCE
 LTC_LDFLAGS = $(LDFLAGS) $(EXTRALIBS)
-VERSION=1.18.0
+VERSION=1.18.0-rc1
 
 #Libraries to be created (this makefile builds only static libraries)
 LIBMAIN_S =libtomcrypt.a

+ 3 - 2
makefile_include.mk

@@ -2,8 +2,9 @@
 # Include makefile used by makefile + makefile.shared
 #  (GNU make only)
 
-# The version - BEWARE: VERSION and VERSION_LT are updated via ./updatemakes.sh
-VERSION=1.18.0
+# The version - BEWARE: VERSION, VERSION_PC and VERSION_LT are updated via ./updatemakes.sh
+VERSION=1.18.0-rc1
+VERSION_PC=1.18.0
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
 VERSION_LT=0:118