[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Sat Mar 19 21:20:00 UTC 2016


The branch master has been updated
       via  812e0c8d68da2f40e216aebc042cec6f38180a28 (commit)
       via  9a9f8ee78894a5f1d4e1f0eca2b888fec8012f98 (commit)
       via  ad2c5ed74ed16018779681ea603c96cb7b2b02fa (commit)
      from  37bbfd48377d7e952e2f293e406fd7fe48fa735c (commit)


- Log -----------------------------------------------------------------
commit 812e0c8d68da2f40e216aebc042cec6f38180a28
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Mar 19 20:12:26 2016 +0100

    make update
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

commit 9a9f8ee78894a5f1d4e1f0eca2b888fec8012f98
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Mar 19 20:04:51 2016 +0100

    Don't let 'generate' target depend on generated files, act directly instead
    
    One of the 'generate' targets depended on $(SRCDIR)/apps/progs.h,
    which depended on...  nothing.  This meant it never got regenerated
    once it existed, regardless of need.  Of course, we could have it
    depend on all the files checked to generate it, but they also depend
    on progs.h, so we'd end up getting cricular dependencies, which makes
    make unhappy.
    
    Furthermore, and this applies for the other generated files, having
    them as targets means that they may be regenerated on the fly in some
    cases, and since they get written to the source tree, this isn't such
    a good idea if that tree is read-only (which is a possible situation
    in an out-of-tree build).
    
    So, we move all the actions to the 'generate' targets themselves, thus
    making sure they get regenerated in a controlled manner and regardless
    of dependencies.
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

commit ad2c5ed74ed16018779681ea603c96cb7b2b02fa
Author: Richard Levitte <levitte at openssl.org>
Date:   Sat Mar 19 20:03:56 2016 +0100

    apps/progs.pl: add back the INCLUDE_FUNCTION_TABLE wrapper
    
    Reviewed-by: Viktor Dukhovni <viktor at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 Configurations/unix-Makefile.tmpl | 79 ++++++++++++++-------------------------
 apps/progs.h                      | 29 ++++++++++----
 apps/progs.pl                     |  4 +-
 3 files changed, 54 insertions(+), 58 deletions(-)

diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 8bcb224..3a3fd2e 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -617,13 +617,35 @@ generate: generate_apps generate_crypto_bn generate_crypto_objects
 lint:
 	lint -DLINT $(INCLUDES) $(SRCS)
 
-generate_apps: $(SRCDIR)/apps/openssl-vms.cnf $(SRCDIR)/apps/progs.h
-
-generate_crypto_bn: $(SRCDIR)/crypto/bn/bn_prime.h
-
-generate_crypto_objects: $(SRCDIR)/crypto/objects/obj_dat.h \
-                         $(SRCDIR)/include/openssl/obj_mac.h \
-                         $(SRCDIR)/crypto/objects/obj_xref.h
+{- # because the program apps/openssl has object files as sources, and
+   # they then have the corresponding C files as source, we need to chain
+   # the lookups in %unified_info
+   my $apps_openssl = catfile("apps","openssl");
+   our @openssl_source = map { @{$unified_info{sources}->{$_}} }
+                         @{$unified_info{sources}->{$apps_openssl}};
+   ""; -}
+generate_apps:
+	( cd $(SRCDIR); $(PERL) VMS/VMSify-conf.pl \
+				< apps/openssl.cnf > apps/openssl-vms.cnf )
+	( b=`pwd`; cd $(SRCDIR); $(PERL) -I$$b apps/progs.pl \
+					{- join(" ", @openssl_source) -} \
+					> apps/progs.h )
+
+generate_crypto_bn:
+	( cd $(SRCDIR); $(PERL) crypto/bn/bn_prime.pl > crypto/bn/bn_prime.h )
+
+generate_crypto_objects:
+	( cd $(SRCDIR); $(PERL) crypto/objects/obj_dat.pl \
+				include/openssl/obj_mac.h \
+				crypto/objects/obj_dat.h )
+	( cd $(SRCDIR); $(PERL) crypto/objects/objects.pl \
+				crypto/objects/objects.txt \
+				crypto/objects/obj_mac.num \
+				include/openssl/obj_mac.h )
+	( cd $(SRCDIR); $(PERL) crypto/objects/objxref.pl \
+				crypto/objects/obj_mac.num \
+				crypto/objects/obj_xref.txt \
+				> crypto/objects/obj_xref.h )
 
 errors:
 	( cd $(SRCDIR); $(PERL) util/ck_errf.pl -strict */*.c */*/*.c )
@@ -691,49 +713,6 @@ $(BLDDIR)/util/shlib_wrap.sh: configdata.pm
 	    ln -sf "../$(SRCDIR)/util/shlib_wrap.sh" "$(BLDDIR)/util"; \
 	fi
 
-$(SRCDIR)/apps/openssl-vms.cnf: $(SRCDIR)/apps/openssl.cnf
-	$(PERL) $(SRCDIR)/VMS/VMSify-conf.pl \
-                < $(SRCDIR)/apps/openssl.cnf > $(SRCDIR)/apps/openssl-vms.cnf
-
-{- # because the program apps/openssl has object files as sources, and
-   # they then have the corresponding C files as source, we need to chain
-   # the lookups in %unified_info
-   my $apps_openssl = catfile("apps","openssl");
-   our @openssl_source = map { @{$unified_info{sources}->{$_}} }
-                         @{$unified_info{sources}->{$apps_openssl}};
-   ""; -}
-$(SRCDIR)/apps/progs.h:
-	$(RM) $@
-	$(PERL) $(SRCDIR)/apps/progs.pl {- join(" ", @openssl_source) -} > $@
-
-$(SRCDIR)/crypto/bn/bn_prime.h: $(SRCDIR)/crypto/bn/bn_prime.pl
-	$(PERL) $(SRCDIR)/crypto/bn/bn_prime.pl > $(SRCDIR)/crypto/bn/bn_prime.h
-
-$(SRCDIR)/crypto/objects/obj_dat.h: $(SRCDIR)/crypto/objects/obj_dat.pl \
-                                    $(SRCDIR)/include/openssl/obj_mac.h
-	$(PERL) $(SRCDIR)/crypto/objects/obj_dat.pl \
-                $(SRCDIR)/include/openssl/obj_mac.h \
-                $(SRCDIR)/crypto/objects/obj_dat.h
-
-# objects.pl both reads and writes obj_mac.num
-$(SRCDIR)/include/openssl/obj_mac.h: $(SRCDIR)/crypto/objects/objects.pl \
-                                     $(SRCDIR)/crypto/objects/objects.txt \
-                                     $(SRCDIR)/crypto/objects/obj_mac.num
-	$(PERL) $(SRCDIR)/crypto/objects/objects.pl \
-                $(SRCDIR)/crypto/objects/objects.txt \
-                $(SRCDIR)/crypto/objects/obj_mac.num \
-                $(SRCDIR)/include/openssl/obj_mac.h
-	@sleep 1; touch $(SRCDIR)/include/openssl/obj_mac.h; sleep 1
-
-$(SRCDIR)/crypto/objects/obj_xref.h: $(SRCDIR)/crypto/objects/objxref.pl \
-                                     $(SRCDIR)/crypto/objects/obj_xref.txt \
-                                     $(SRCDIR)/crypto/objects/obj_mac.num
-	$(PERL) $(SRCDIR)/crypto/objects/objxref.pl \
-                $(SRCDIR)/crypto/objects/obj_mac.num \
-                $(SRCDIR)/crypto/objects/obj_xref.txt \
-                > $(SRCDIR)/crypto/objects/obj_xref.h
-	@sleep 1; touch $(SRCDIR)/crypto/objects/obj_xref.h; sleep 1
-
 FORCE:
 
 # Building targets ###################################################
diff --git a/apps/progs.h b/apps/progs.h
index 3bdf821..aa37d36 100644
--- a/apps/progs.h
+++ b/apps/progs.h
@@ -1,7 +1,12 @@
 /*
  * Automatically generated by progs.pl for openssl.c
- * Copyright (c) 2008 The OpenSSL Project.  All rights reserved.
- * See the openssl.c for copyright details.
+ * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the OpenSSL licenses, (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * https://www.openssl.org/source/license.html
+ * or in the file LICENSE in the source distribution.
  */
 
 typedef enum FUNC_TYPE {
@@ -120,7 +125,7 @@ extern OPTIONS x509_options[];
 static FUNCTION functions[] = {
     { FT_general, "asn1parse", asn1parse_main, asn1parse_options },
     { FT_general, "ca", ca_main, ca_options },
-#if !defined(OPENSSL_NO_SOCK)
+#ifndef OPENSSL_NO_SOCK
     { FT_general, "ciphers", ciphers_main, ciphers_options },
 #endif
 #ifndef OPENSSL_NO_CMS
@@ -164,7 +169,7 @@ static FUNCTION functions[] = {
     { FT_general, "ocsp", ocsp_main, ocsp_options },
 #endif
     { FT_general, "passwd", passwd_main, passwd_options },
-#if !defined(OPENSSL_NO_DES)
+#ifndef OPENSSL_NO_DES
     { FT_general, "pkcs12", pkcs12_main, pkcs12_options },
 #endif
     { FT_general, "pkcs7", pkcs7_main, pkcs7_options },
@@ -182,13 +187,13 @@ static FUNCTION functions[] = {
 #ifndef OPENSSL_NO_RSA
     { FT_general, "rsautl", rsautl_main, rsautl_options },
 #endif
-#if !defined(OPENSSL_NO_SOCK)
+#ifndef OPENSSL_NO_SOCK
     { FT_general, "s_client", s_client_main, s_client_options },
 #endif
-#if !defined(OPENSSL_NO_SOCK)
+#ifndef OPENSSL_NO_SOCK
     { FT_general, "s_server", s_server_main, s_server_options },
 #endif
-#if !defined(OPENSSL_NO_SOCK)
+#ifndef OPENSSL_NO_SOCK
     { FT_general, "s_time", s_time_main, s_time_options },
 #endif
     { FT_general, "sess_id", sess_id_main, sess_id_options },
@@ -216,11 +221,21 @@ static FUNCTION functions[] = {
 #ifndef OPENSSL_NO_MD_GHOST94
     { FT_md, "md_ghost94", dgst_main},
 #endif
+#ifndef OPENSSL_NO_SHA
     { FT_md, "sha1", dgst_main},
+#endif
+#ifndef OPENSSL_NO_SHA
     { FT_md, "sha224", dgst_main},
+#endif
+#ifndef OPENSSL_NO_SHA
     { FT_md, "sha256", dgst_main},
+#endif
+#ifndef OPENSSL_NO_SHA
     { FT_md, "sha384", dgst_main},
+#endif
+#ifndef OPENSSL_NO_SHA
     { FT_md, "sha512", dgst_main},
+#endif
 #ifndef OPENSSL_NO_MDC2
     { FT_md, "mdc2", dgst_main},
 #endif
diff --git a/apps/progs.pl b/apps/progs.pl
index 50b6cee..669e82b 100644
--- a/apps/progs.pl
+++ b/apps/progs.pl
@@ -67,6 +67,8 @@ foreach (@ARGV) {
 	printf "extern OPTIONS %s_options[];\n", $_;
 }
 
+print "\n#ifdef INCLUDE_FUNCTION_TABLE\n";
+print "static FUNCTION functions[] = {\n";
 my %cmd_disabler = (
     ciphers  => "sock",
     genrsa   => "rsa",
@@ -78,7 +80,6 @@ my %cmd_disabler = (
     ecparam  => "ec",
     pkcs12   => "des",
     );
-print "\nstatic FUNCTION functions[] = {\n";
 foreach my $cmd (@ARGV) {
 	my $str="    { FT_general, \"$cmd\", ${cmd}_main, ${cmd}_options },\n";
 	if ($cmd =~ /^s_/) {
@@ -157,3 +158,4 @@ foreach my $cmd (
 }
 
 print "    { 0, NULL, NULL}\n};\n";
+print "#endif\n";


More information about the openssl-commits mailing list