[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Mon Jul 18 18:50:00 UTC 2016


The branch master has been updated
       via  1e3d16b0a62a9523b44cfcd65abc5998949ed9ab (commit)
       via  7218ae513408a58e8f8f20ed49dc45505e00a5b2 (commit)
       via  0f01b7bc8536c816f7b6e9305437346b68a1fe89 (commit)
       via  52fef270bf037a2b8caffdb34f6195191c08d9f2 (commit)
       via  7f5af797287eb21469b27b43358a9e916cdc1445 (commit)
      from  3cea73a7fcaaada1ea0ee4b4353ed0176fee1112 (commit)


- Log -----------------------------------------------------------------
commit 1e3d16b0a62a9523b44cfcd65abc5998949ed9ab
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Jul 8 17:58:36 2016 +0200

    Don't make a difference between building test programs and other programs
    
    This adds a new target 'build_programs' and makes 'build_apps' and
    'build_tests' aliases for it, for backward compatibility.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit 7218ae513408a58e8f8f20ed49dc45505e00a5b2
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Jul 8 14:52:51 2016 +0200

    Use _NO_INST in some build.info files
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit 0f01b7bc8536c816f7b6e9305437346b68a1fe89
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Jul 8 14:52:09 2016 +0200

    Adapt the build files to the new "install" hash table
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit 52fef270bf037a2b8caffdb34f6195191c08d9f2
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Jul 8 14:51:23 2016 +0200

    Document the _NO_INST variants
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

commit 7f5af797287eb21469b27b43358a9e916cdc1445
Author: Richard Levitte <levitte at openssl.org>
Date:   Fri Jul 8 14:28:58 2016 +0200

    build.info: implement PROGRAM_NO_INST, and dito for ENGINES, SCRIPTS, LIBS
    
    PROGRAM_NO_INST, ENGINES_NO_INST, SCRIPTS_NO_INST and LIBS_NO_INST are
    to be used to specify program, engines, scripts and libraries that are
    not to be installed in the system.  Fuzzers, test programs, that sort
    of things are of the _NO_INST type, for example.
    
    For the benefit of build file templates and other templates that use
    data from configdata.pm, a new hash table $unified_info{install} is
    created.  It contains a set of subhashes, one for each type of
    installable, each having an array of file names as values.  For
    example, it can look like this:
    
        "install" =>
            {
                "engines" =>
                    [
                        "engines/afalg/afalg",
                        "engines/capi",
                        "engines/dasync",
                        "engines/padlock",
                    ],
                "libraries" =>
                    [
                        "libcrypto",
                        "libssl",
                    ],
                "programs" =>
                    [
                        "apps/openssl",
                    ],
                "scripts" =>
                    [
                        "apps/CA.pl",
                        "apps/tsget",
                        "tools/c_rehash",
                    ],
            },
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

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

Summary of changes:
 Configurations/README.design         | 60 ++++++++++++++++++++-----
 Configurations/descrip.mms.tmpl      | 38 ++++++++--------
 Configurations/unix-Makefile.tmpl    | 48 ++++++++++----------
 Configurations/windows-makefile.tmpl | 52 ++++++++++++----------
 Configure                            | 86 ++++++++++++++++++++++++++++++------
 engines/build.info                   |  3 +-
 fuzz/build.info                      |  4 +-
 test/build.info                      |  4 +-
 8 files changed, 199 insertions(+), 96 deletions(-)

diff --git a/Configurations/README.design b/Configurations/README.design
index 5777e72..bea9790 100644
--- a/Configurations/README.design
+++ b/Configurations/README.design
@@ -37,7 +37,9 @@ build-file templates, adapted for the platform they are meant for (see
 sections on %unified_info and build-file templates further down).
 
 The variables PROGRAMS, LIBS, ENGINES and SCRIPTS are used to declare
-end products.
+end products.  There are variants for them with '_NO_INST' as suffix
+(PROGRAM_NO_INST etc) to specify end products that shouldn't get
+installed.
 
 The variables SOURCE, DEPEND, INCLUDE and ORDINALS are indexed by a
 produced file, and their values are the source used to produce that
@@ -124,17 +126,24 @@ This is the build.info file in 'ssl/', and it tells us that the
 library 'libssl' is built from the source file 'ssl/tls.c'.
 
     # engines/build.info
-    ENGINES=libossltest
-    SOURCE[libossltest]=e_ossltest.c
-    DEPEND[libossltest]=../libcrypto
-    INCLUDE[libossltest]=../include
-
-This is the build.info file in 'engines/', telling us that an engine
-called 'engines/libossltest' shall be built, that it's source is
+    ENGINES=dasync
+    SOURCE[dasync]=e_dasync.c
+    DEPEND[dasync]=../libcrypto
+    INCLUDE[dasync]=../include
+
+    ENGINES_NO_INST=ossltest
+    SOURCE[ossltest]=e_ossltest.c
+    DEPEND[ossltest]=../libcrypto
+    INCLUDE[ossltest]=../include
+
+This is the build.info file in 'engines/', telling us that two engines
+called 'engines/dasync' and 'engines/ossltest' shall be built, that
+dasync's source is 'engines/e_dasync.c' and ossltest's source is
 'engines/e_ossltest.c' and that the include directory 'include/' may
-be used when building anything that will be part of this engine.
-Finally, the engine 'engines/libossltest' depends on the library
-'libcrypto' to function properly.
+be used when building anything that will be part of these engines.
+Also, both engines depend on the library 'libcrypto' to function
+properly.  Finally, only dasync is being installed, as ossltest is
+only for internal testing.
 
 When Configure digests these build.info files, the accumulated
 information comes down to this:
@@ -154,7 +163,12 @@ information comes down to this:
     INCLUDE[apps/openssl]=. include
     DEPEND[apps/openssl]=libssl
 
-    ENGINES=engines/ossltest
+    ENGINES=engines/dasync
+    SOURCE[engines/dasync]=engines/e_dasync.c
+    DEPEND[engines/dasync]=libcrypto
+    INCLUDE[engines/dasync]=include
+
+    ENGINES_NO_INST=engines/ossltest
     SOURCE[engines/ossltest]=engines/e_ossltest.c
     DEPEND[engines/ossltest]=libcrypto
     INCLUDE[engines/ossltest]=include
@@ -213,6 +227,11 @@ indexes:
                pairs.  These are directly inferred from the INCLUDE
                variables in build.info files.
 
+  install   => a hash table containing 'type' => [ 'file' ... ] pairs.
+               The types are 'programs', 'libraries', 'engines' and
+               'scripts', and the array of files list the files of
+               that type that should be installed.
+
   libraries => a list of libraries.  These are directly inferred from
                the LIBS variable in build.info files.
 
@@ -277,6 +296,7 @@ section above would be digested into a %unified_info table:
             },
         "engines" =>
             [
+                "engines/dasync",
                 "engines/ossltest",
             ],
         "generate" =>
@@ -313,6 +333,22 @@ section above would be digested into a %unified_info table:
                         "util",
                     ],
             }
+        "install" =>
+            {
+                "engines" =>
+                    [
+                        "engines/dasync",
+                    ],
+                "libraries" =>
+                    [
+                        "libcrypto",
+                        "libssl",
+                    ],
+                "programs" =>
+                    [
+                        "apps/openssl",
+                    ],
+           },
         "libraries" =>
             [
                 "libcrypto",
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl
index b3cf430..706b4f4 100644
--- a/Configurations/descrip.mms.tmpl
+++ b/Configurations/descrip.mms.tmpl
@@ -43,8 +43,7 @@
   # Because we need to make two computations of these data,
   # we store them in arrays for reuse
   our @shlibs = map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}};
-  our @programs = grep { !m|^\[\.test\]| } @{$unified_info{programs}};
-  our @testprogs = grep { m|^\[\.test\]| } @{$unified_info{programs}};
+  our @install_shlibs = map { $unified_info{sharednames}->{$_} || () } @{$unified_info{install}->{libraries}};
   our @generated = ( ( map { (my $x = $_) =~ s|\.S$|\.s|; $x }
                        grep { defined $unified_info{generate}->{$_} }
                        map { @{$unified_info{sources}->{$_}} }
@@ -118,8 +117,7 @@ DEP_EXT=.D
 LIBS={- join(", ", map { "-\n\t".$_.".OLB" } @{$unified_info{libraries}}) -}
 SHLIBS={- join(", ", map { "-\n\t".$_.".EXE" } @shlibs) -}
 ENGINES={- join(", ", map { "-\n\t".$_.".EXE" } @{$unified_info{engines}}) -}
-PROGRAMS={- join(", ", map { "-\n\t".$_.".EXE" } @programs) -}
-TESTPROGS={- join(", ", map { "-\n\t".$_.".EXE" } @testprogs) -}
+PROGRAMS={- join(", ", map { "-\n\t".$_.".EXE" } @{$unified_info{programs}}) -}
 SCRIPTS={- join(", ", map { "-\n\t".$_ } @{$unified_info{scripts}}) -}
 {- output_off() if $disabled{makedepend}; "" -}
 DEPS={- our @deps = map { (my $x = $_) =~ s|\.o$|\$(DEP_EXT)|; $x; }
@@ -130,6 +128,10 @@ DEPS={- our @deps = map { (my $x = $_) =~ s|\.o$|\$(DEP_EXT)|; $x; }
 GENERATED_MANDATORY={- join(", ", map { "-\n\t".$_ } @{$unified_info{depends}->{""}} ) -}
 GENERATED={- join(", ", map { "-\n\t".$_ } @generated) -}
 
+INSTALL_LIBS={- join(", ", map { "-\n\t".$_.".OLB" } @{$unified_info{install}->{libraries}}) -}
+INSTALL_SHLIBS={- join(", ", map { "-\n\t".$_.".EXE" } @install_shlibs) -}
+INSTALL_ENGINES={- join(", ", map { "-\n\t".$_.".EXE" } @{$unified_info{install}->{engines}}) -}
+INSTALL_PROGRAMS={- join(", ", map { "-\n\t".$_.".EXE" } @{$unified_info{install}->{programs}}) -}
 {- output_off() if $disabled{apps}; "" -}
 BIN_SCRIPTS=[.tools]c_rehash.pl
 MISC_SCRIPTS=[.apps]CA.pl, [.apps]tsget.pl
@@ -240,22 +242,22 @@ NODEBUG=@
 # The main targets ###################################################
 
 all : build_generated, -
-      build_libs_nodep, build_engines_nodep, build_apps_nodep, -
+      build_libs_nodep, build_engines_nodep, build_programs_nodep, -
       depend
 
 build_libs : build_generated, build_libs_nodep, depend
 build_libs_nodep : $(LIBS), $(SHLIBS)
 build_engines : build_generated, build_engines_nodep, depend
 build_engines_nodep : $(ENGINES)
-build_apps : build_generated, build_apps_nodep, depend
-build_apps_nodep : $(PROGRAMS), $(SCRIPTS)
-build_tests : build_generated, build_tests_nodep, depend
-build_tests_nodep : $(TESTPROGS)
+build_programs : build_generated, build_programs_nodep, depend
+build_programs_nodep : $(PROGRAMS), $(SCRIPTS)
 
 build_generated : $(GENERATED_MANDATORY)
 
-test tests : build_generated, -
-             build_apps_nodep, build_engines_nodep, build_tests_nodep, -
+# Kept around for backward compatibility
+build_apps build_tests : build_programs
+
+test tests : build_generated, build_programs_nodep, build_engines_nodep, -
              depend
         @ ! {- output_off() if $disabled{tests}; "" -}
         SET DEFAULT [.test]{- move("test") -}
@@ -312,14 +314,13 @@ check_install :
 uninstall : uninstall_docs uninstall_sw
 
 # Because VMS wants the generation number (or *) to delete files, we can't
-# use $(LIBS), $(PROGRAMS), $(GENERATED), $(ENGINES) and $(TESTPROGS) directly.
+# use $(LIBS), $(PROGRAMS), $(GENERATED) and $(ENGINES)directly.
 libclean :
         {- join("\n\t", map { "- DELETE $_.OLB;*" } @{$unified_info{libraries}}) || "@ !" -}
         {- join("\n\t", map { "- DELETE $_.EXE;*,$_.MAP;*,$_.OPT;*" } @shlibs) || "@ !" -}
 
 clean : libclean
-        {- join("\n\t", map { "- DELETE $_.EXE;*,$_.OPT;*" } @programs) || "@ !" -}
-        {- join("\n\t", map { "- DELETE $_.EXE;*,$_.OPT;*" } @testprogs) || "@ !" -}
+        {- join("\n\t", map { "- DELETE $_.EXE;*,$_.OPT;*" } @{$unified_info{programs}}) || "@ !" -}
         {- join("\n\t", map { "- DELETE $_.EXE;*,$_.OPT;*" } @{$unified_info{engines}}) || "@ !" -}
         {- join("\n\t", map { "- DELETE $_;*" } @{$unified_info{scripts}}) || "@ !" -}
         {- join("\n\t", map { "- DELETE $_;*" } @generated) || "@ !" -}
@@ -382,12 +383,11 @@ install_dev : check_INSTALLTOP
         - CREATE/DIR ossl_installroot:[LIB.'arch']
         {- join("\n        ",
                 map { "COPY/PROT=W:R $_.OLB ossl_installroot:[LIB.'arch']" }
-                @{$unified_info{libraries}}) -}
+                @{$unified_info{install}->{libraries}}) -}
         @ {- output_off() if $disabled{shared}; "" -} !
         {- join("\n        ",
-                map { "COPY/PROT=W:RE $_.EXE ossl_installroot:[LIB.'arch']" }
-                map { $unified_info{sharednames}->{$_} || () }
-                @{$unified_info{libraries}}) -}
+                map { "COPY/PROT=W:R $_.OLB ossl_installroot:[LIB.'arch']" }
+                @install_shlibs) -}
         @ {- output_on() if $disabled{shared}; "" -} !
 
 install_runtime : check_INSTALLTOP
@@ -407,7 +407,7 @@ install_engines : check_INSTALLTOP
         - CREATE/DIR ossl_installroot:[ENGINES{- $sover.$target{pointer_size} -}.'arch']
         {- join("\n        ",
                 map { "COPY/PROT=W:RE $_.EXE ossl_installroot:[ENGINES$sover$target{pointer_size}.'arch']" }
-                grep(!m|ossltest$|i, @{$unified_info{engines}})) -}
+                @{$unified_info{install}->{engines}}) -}
         @ {- output_on() unless scalar @{$unified_info{engines}}; "" -} !
 
 install_startup : [.VMS]openssl_startup.com [.VMS]openssl_shutdown.com -
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 495edb9..783fbc4 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -86,9 +86,9 @@ SHLIB_TARGET={- $target{shared_target} -}
 
 LIBS={- join(" ", map { $_.$libext } @{$unified_info{libraries}}) -}
 SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{libraries}}) -}
+SHLIB_INFO={- join(" ", map { "\"".shlib($_).";".shlib_simple($_)."\"" } @{$unified_info{libraries}}) -}
 ENGINES={- join(" ", map { dso($_) } @{$unified_info{engines}}) -}
-PROGRAMS={- join(" ", map { $_.$exeext } grep { !m|^test/| } @{$unified_info{programs}}) -}
-TESTPROGS={- join(" ", map { $_.$exeext } grep { m|^test/| } @{$unified_info{programs}}) -}
+PROGRAMS={- join(" ", map { $_.$exeext } @{$unified_info{programs}}) -}
 SCRIPTS={- join(" ", @{$unified_info{scripts}}) -}
 {- output_off() if $disabled{makedepend}; "" -}
 DEPS={- join(" ", map { (my $x = $_) =~ s|\.o$|$depext|; $x; }
@@ -103,13 +103,16 @@ GENERATED={- join(" ",
                     grep { /\.o$/ } keys %{$unified_info{sources}} ),
                   ( grep { /\.h$/ } keys %{$unified_info{generate}} )) -}
 
+INSTALL_LIBS={- join(" ", map { $_.$libext } @{$unified_info{install}->{libraries}}) -}
+INSTALL_SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{install}->{libraries}}) -}
+INSTALL_SHLIB_INFO={- join(" ", map { "\"".shlib($_).";".shlib_simple($_)."\"" } @{$unified_info{install}->{libraries}}) -}
+INSTALL_ENGINES={- join(" ", map { dso($_) } @{$unified_info{install}->{engines}}) -}
+INSTALL_PROGRAMS={- join(" ", map { $_.$exeext } @{$unified_info{install}->{programs}}) -}
 {- output_off() if $disabled{apps}; "" -}
 BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
 MISC_SCRIPTS=$(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget
 {- output_on() if $disabled{apps}; "" -}
 
-SHLIB_INFO={- join(" ", map { "\"".shlib($_).";".shlib_simple($_)."\"" } @{$unified_info{libraries}}) -}
-
 # DESTDIR is for package builders so that they can configure for, say,
 # /usr/ and yet have everything installed to /tmp/somedir/usr/.
 # Normally it is left empty.
@@ -221,21 +224,21 @@ PROCESSOR= {- $config{processor} -}
 
 # The main targets ###################################################
 
-{- dependmagic('all'); -}: build_libs_nodep build_engines_nodep build_apps_nodep link-utils
+{- dependmagic('all'); -}: build_libs_nodep build_engines_nodep build_programs_nodep link-utils
 {- dependmagic('build_libs'); -}: build_libs_nodep
 {- dependmagic('build_engines'); -}: build_engines_nodep
-{- dependmagic('build_apps'); -}: build_apps_nodep
-{- dependmagic('build_tests'); -}: build_tests_nodep
+{- dependmagic('build_programs'); -}: build_programs_nodep
 
 build_generated: $(GENERATED_MANDATORY)
 build_libs_nodep: libcrypto.pc libssl.pc openssl.pc
 build_engines_nodep: $(ENGINES)
-build_apps_nodep: $(PROGRAMS) $(SCRIPTS)
-build_tests_nodep: $(TESTPROGS)
+build_programs_nodep: $(PROGRAMS) $(SCRIPTS)
+
+# Kept around for backward compatibility
+build_apps build_tests: build_programs
 
 test: tests
-{- dependmagic('tests'); -}: build_tests_nodep build_apps_nodep \
-                             build_engines_nodep link-utils
+{- dependmagic('tests'); -}: build_programs_nodep build_engines_nodep link-utils
 	@ : {- output_off() if $disabled{tests}; "" -}
 	( cd test; \
 	  SRCTOP=../$(SRCDIR) \
@@ -355,7 +358,7 @@ install_dev:
 		chmod 644 $(DESTDIR)$(INSTALLTOP)/include/openssl/$$fn; \
 	done
 	@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)
-	@set -e; for l in $(LIBS); do \
+	@set -e; for l in $(INSTALL_LIBS); do \
 		fn=`basename $$l`; \
 		echo "install $$l -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
 		cp $$l $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new; \
@@ -365,7 +368,7 @@ install_dev:
 		      $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
 	done
 	@ : {- output_off() if $disabled{shared}; "" -}
-	@set -e; for s in $(SHLIB_INFO); do \
+	@set -e; for s in $(INSTALL_SHLIB_INFO); do \
 		s1=`echo "$$s" | cut -f1 -d";"`; \
 		s2=`echo "$$s" | cut -f2 -d";"`; \
 		fn1=`basename $$s1`; \
@@ -414,13 +417,13 @@ uninstall_dev:
 	done
 	-$(RMDIR) $(DESTDIR)$(INSTALLTOP)/include/openssl
 	-$(RMDIR) $(DESTDIR)$(INSTALLTOP)/include
-	@set -e; for l in $(LIBS); do \
+	@set -e; for l in $(INSTALL_LIBS); do \
 		fn=`basename $$l`; \
 		echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
 		$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
 	done
 	@ : {- output_off() if $disabled{shared}; "" -}
-	@set -e; for s in $(SHLIB_INFO); do \
+	@set -e; for s in $(INSTALL_SHLIB_INFO); do \
 		s1=`echo "$$s" | cut -f1 -d";"`; \
 		s2=`echo "$$s" | cut -f2 -d";"`; \
 		fn1=`basename $$s1`; \
@@ -448,12 +451,9 @@ install_engines:
 	@[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
 	@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(ENGINESDIR)/
 	@echo "*** Installing engines"
-	@set -e; for e in dummy $(ENGINES); do \
+	@set -e; for e in dummy $(INSTALL_ENGINES); do \
 		if [ "$$e" = "dummy" ]; then continue; fi; \
 		fn=`basename $$e`; \
-		if [ "$$fn" = '{- dso("ossltest") -}' ]; then \
-			continue; \
-		fi; \
 		echo "install $$e -> $(DESTDIR)$(ENGINESDIR)/$$fn"; \
 		cp $$e $(DESTDIR)$(ENGINESDIR)/$$fn.new; \
 		chmod 755 $(DESTDIR)$(ENGINESDIR)/$$fn.new; \
@@ -463,7 +463,7 @@ install_engines:
 
 uninstall_engines:
 	@echo "*** Uninstalling engines"
-	@set -e; for e in dummy $(ENGINES); do \
+	@set -e; for e in dummy $(INSTALL_ENGINES); do \
 		if [ "$$e" = "dummy" ]; then continue; fi; \
 		fn=`basename $$e`; \
 		if [ "$$fn" = '{- dso("ossltest") -}' ]; then \
@@ -480,7 +480,7 @@ install_runtime:
 	@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/misc
 	@echo "*** Installing runtime files"
 	@ : {- output_off() unless windowsdll(); "" -}
-	@set -e; for s in dummy $(SHLIBS); do \
+	@set -e; for s in dummy $(INSTALL_SHLIBS); do \
 		if [ "$$s" = "dummy" ]; then continue; fi; \
 		fn=`basename $$s`; \
 		echo "install $$s -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
@@ -490,7 +490,7 @@ install_runtime:
 		      $(DESTDIR)$(INSTALLTOP)/bin/$$fn; \
 	done
 	@ : {- output_on() unless windowsdll(); "" -}
-	@set -e; for x in dummy $(PROGRAMS); do \
+	@set -e; for x in dummy $(INSTALL_PROGRAMS); do \
 		if [ "$$x" = "dummy" ]; then continue; fi; \
 		fn=`basename $$x`; \
 		echo "install $$x -> $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
@@ -511,7 +511,7 @@ install_runtime:
 
 uninstall_runtime:
 	@echo "*** Uninstalling runtime files"
-	@set -e; for x in dummy $(PROGRAMS); \
+	@set -e; for x in dummy $(INSTALL_PROGRAMS); \
 	do  \
 		if [ "$$x" = "dummy" ]; then continue; fi; \
 		fn=`basename $$x`; \
@@ -533,7 +533,7 @@ uninstall_runtime:
 		$(RM) $(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \
 	done
 	@ : {- output_off() unless windowsdll(); "" -}
-	@set -e; for s in dummy $(SHLIBS); do \
+	@set -e; for s in dummy $(INSTALL_SHLIBS); do \
 		if [ "$$s" = "dummy" ]; then continue; fi; \
 		fn=`basename $$s`; \
 		echo "$(RM) $(DESTDIR)$(INSTALLTOP)/bin/$$fn"; \
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index 4eedaa2..b35feb5 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -65,15 +65,9 @@ SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{libraries}}) -}
 SHLIBPDBS={- join(" ", map { local $shlibext = ".pdb"; shlib($_) } @{$unified_info{libraries}}) -}
 ENGINES={- join(" ", map { dso($_) } @{$unified_info{engines}}) -}
 ENGINEPDBS={- join(" ", map { local $dsoext = ".pdb"; dso($_) } @{$unified_info{engines}}) -}
-PROGRAMS={- join(" ", map { $_.$exeext } grep { !m|^test\\| } @{$unified_info{programs}}) -}
-PROGRAMPDBS={- join(" ", map { $_.".pdb" } grep { !m|^test\\| } @{$unified_info{programs}}) -}
-TESTPROGS={- join(" ", map { $_.$exeext } grep { m|^test\\| } @{$unified_info{programs}}) -}
+PROGRAMS={- join(" ", map { $_.$exeext } @{$unified_info{programs}}) -}
+PROGRAMPDBS={- join(" ", map { $_.".pdb" } @{$unified_info{programs}}) -}
 SCRIPTS={- join(" ", @{$unified_info{scripts}}) -}
-{- output_off() if $disabled{apps}; "" -}
-BIN_SCRIPTS=$(BLDDIR)\tools\c_rehash.pl
-MISC_SCRIPTS=$(BLDDIR)\apps\CA.pl $(BLDDIR)\apps\tsget.pl
-{- output_on() if $disabled{apps}; "" -}
-
 {- output_off() if $disabled{makedepend}; "" -}
 DEPS={- join(" ", map { (my $x = $_) =~ s|\.o$|$depext|; $x; }
                   grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ }
@@ -87,6 +81,18 @@ GENERATED={- join(" ",
                     grep { /\.o$/ } keys %{$unified_info{sources}} ),
                   ( grep { /\.h$/ } keys %{$unified_info{generate}} )) -}
 
+INSTALL_LIBS={- join(" ", map { $_.$libext } @{$unified_info{install}->{libraries}}) -}
+INSTALL_SHLIBS={- join(" ", map { shlib($_) } @{$unified_info{install}->{libraries}}) -}
+INSTALL_SHLIBPDBS={- join(" ", map { local $shlibext = ".pdb"; shlib($_) } @{$unified_info{install}->{libraries}}) -}
+INSTALL_ENGINES={- join(" ", map { dso($_) } @{$unified_info{install}->{engines}}) -}
+INSTALL_ENGINEPDBS={- join(" ", map { local $dsoext = ".pdb"; dso($_) } @{$unified_info{install}->{engines}}) -}
+INSTALL_PROGRAMS={- join(" ", map { $_.$exeext } grep { !m|^test\\| } @{$unified_info{install}->{programs}}) -}
+INSTALL_PROGRAMPDBS={- join(" ", map { $_.".pdb" } grep { !m|^test\\| } @{$unified_info{install}->{programs}}) -}
+{- output_off() if $disabled{apps}; "" -}
+BIN_SCRIPTS=$(BLDDIR)\tools\c_rehash.pl
+MISC_SCRIPTS=$(BLDDIR)\apps\CA.pl $(BLDDIR)\apps\tsget.pl
+{- output_on() if $disabled{apps}; "" -}
+
 # Do not edit these manually. Use Configure with --prefix or --openssldir
 # to change this!  Short explanation in the top comment in Configure
 INSTALLTOP_dev={- # $prefix is used in the OPENSSLDIR perl snippet
@@ -172,22 +178,22 @@ PROCESSOR= {- $config{processor} -}
 # The main targets ###################################################
 
 all: build_generated \
-     build_libs_nodep build_engines_nodep build_apps_nodep depend
+     build_libs_nodep build_engines_nodep build_programs_nodep depend
 
 build_libs: build_generated build_libs_nodep depend
 build_libs_nodep: $(LIBS) {- join(" ",map { shlib_import($_) } @{$unified_info{libraries}}) -}
 build_engines: build_generated build_engines_nodep depend
 build_engines_nodep: $(ENGINES)
-build_apps: build_generated build_apps_nodep depend
-build_apps_nodep: $(PROGRAMS) $(SCRIPTS)
-build_tests: build_generated build_tests_nodep depend
-build_tests_nodep: $(TESTPROGS)
+build_programs: build_generated build_programs_nodep depend
+build_programs_nodep: $(PROGRAMS) $(SCRIPTS)
 
 build_generated: $(GENERATED_MANDATORY)
 
+# Kept around for backward compatibility
+build_apps build_tests: build_programs
+
 test: tests
-tests: build_generated \
-       build_tests_nodep build_apps_nodep build_engines_nodep depend
+tests: build_generated build_programs_nodep build_engines_nodep depend
 	@rem {- output_off() if $disabled{tests}; "" -}
 	set SRCTOP=$(SRCDIR)
 	set BLDTOP=$(BLDDIR)
@@ -217,7 +223,7 @@ libclean:
 	-del /Q ossl_static.pdb
 
 clean: libclean
-	-del /Q /F $(PROGRAMS) $(TESTPROGS) $(ENGINES) $(SCRIPTS)
+	-del /Q /F $(PROGRAMS) $(ENGINES) $(SCRIPTS)
 	-del /Q /F $(GENERATED)
 	-del /Q /S /F *.d
 	-del /Q /S /F *.obj
@@ -268,7 +274,7 @@ install_dev:
 	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BLDDIR)\include\openssl\*.h \
 				       "$(INSTALLTOP)\include\openssl"
 	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\$(LIBDIR)"
-	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(LIBS) \
+	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_LIBS) \
 				       "$(INSTALLTOP)\$(LIBDIR)"
 	@if "$(SHLIBS)"=="" \
 	 "$(PERL)" "$(SRCDIR)\util\copy.pl" ossl_static.pdb \
@@ -281,9 +287,9 @@ install_engines:
 	@echo *** Installing engines
 	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(ENGINESDIR)"
 	@if not "$(ENGINES)"=="" \
-	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(ENGINES) "$(ENGINESDIR)"
+	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_ENGINES) "$(ENGINESDIR)"
 	@if not "$(ENGINES)"=="" \
-	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(ENGINEPDBS) "$(ENGINESDIR)"
+	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_ENGINEPDBS) "$(ENGINESDIR)"
 
 uninstall_engines:
 
@@ -292,13 +298,13 @@ install_runtime:
 	@echo *** Installing runtime files
 	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\bin"
 	@if not "$(SHLIBS)"=="" \
-	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(SHLIBS) "$(INSTALLTOP)\bin"
+	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_SHLIBS) "$(INSTALLTOP)\bin"
 	@if not "$(SHLIBS)"=="" \
-	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(SHLIBPDBS) \
+	 "$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_SHLIBPDBS) \
                                         "$(INSTALLTOP)\bin"
-	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(PROGRAMS) \
+	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_PROGRAMS) \
                                         "$(INSTALLTOP)\bin"
-	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(PROGRAMPDBS) \
+	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(INSTALL_PROGRAMPDBS) \
                                         "$(INSTALLTOP)\bin"
 	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BIN_SCRIPTS) \
                                         "$(INSTALLTOP)\bin"
diff --git a/Configure b/Configure
index bd49a89..bd13d37 100755
--- a/Configure
+++ b/Configure
@@ -1360,9 +1360,13 @@ if ($builder eq "unified") {
         my $f = $_->[1];
         # The basic things we're trying to build
         my @programs = ();
+        my @programs_install = ();
         my @libraries = ();
+        my @libraries_install = ();
         my @engines = ();
+        my @engines_install = ();
         my @scripts = ();
+        my @scripts_install = ();
         my @extra = ();
         my @overrides = ();
         my @intermediates = ();
@@ -1426,18 +1430,42 @@ if ($builder eq "unified") {
             qr/^\s*ENDIF\s*$/
             => sub { die "ENDIF out of scope" if ! @skip;
                      pop @skip; },
-            qr/^\s*PROGRAMS\s*=\s*(.*)\s*$/
-            => sub { push @programs, tokenize($1)
-                         if !@skip || $skip[$#skip] > 0 },
-            qr/^\s*LIBS\s*=\s*(.*)\s*$/
-            => sub { push @libraries, tokenize($1)
-                         if !@skip || $skip[$#skip] > 0 },
-            qr/^\s*ENGINES\s*=\s*(.*)\s*$/
-            => sub { push @engines, tokenize($1)
-                         if !@skip || $skip[$#skip] > 0 },
-            qr/^\s*SCRIPTS\s*=\s*(.*)\s*$/
-            => sub { push @scripts, tokenize($1)
-                         if !@skip || $skip[$#skip] > 0 },
+            qr/^\s*PROGRAMS(_NO_INST)?\s*=\s*(.*)\s*$/
+            => sub {
+                if (!@skip || $skip[$#skip] > 0) {
+                    my $install = $1;
+                    my @x = tokenize($2);
+                    push @programs, @x;
+                    push @programs_install, @x unless $install;
+                }
+            },
+            qr/^\s*LIBS(_NO_INST)?\s*=\s*(.*)\s*$/
+            => sub {
+                if (!@skip || $skip[$#skip] > 0) {
+                    my $install = $1;
+                    my @x = tokenize($2);
+                    push @libraries, @x;
+                    push @libraries_install, @x unless $install;
+                }
+            },
+            qr/^\s*ENGINES(_NO_INST)?\s*=\s*(.*)\s*$/
+            => sub {
+                if (!@skip || $skip[$#skip] > 0) {
+                    my $install = $1;
+                    my @x = tokenize($2);
+                    push @engines, @x;
+                    push @engines_install, @x unless $install;
+                }
+            },
+            qr/^\s*SCRIPTS(_NO_INST)?\s*=\s*(.*)\s*$/
+            => sub {
+                if (!@skip || $skip[$#skip] > 0) {
+                    my $install = $1;
+                    my @x = tokenize($2);
+                    push @scripts, @x;
+                    push @scripts_install, @x unless $install;
+                }
+            },
             qr/^\s*EXTRA\s*=\s*(.*)\s*$/
             => sub { push @extra, tokenize($1)
                          if !@skip || $skip[$#skip] > 0 },
@@ -1523,6 +1551,14 @@ if ($builder eq "unified") {
             $unified_info{programs}->{$program} = 1;
         }
 
+        foreach (@programs_install) {
+            my $program = cleanfile($buildd, $_, $blddir);
+            if ($unified_info{rename}->{$program}) {
+                $program = $unified_info{rename}->{$program};
+            }
+            $unified_info{install}->{programs}->{$program} = 1;
+        }
+
         foreach (@libraries) {
             my $library = cleanfile($buildd, $_, $blddir);
             if ($unified_info{rename}->{$library}) {
@@ -1531,6 +1567,14 @@ if ($builder eq "unified") {
             $unified_info{libraries}->{$library} = 1;
         }
 
+        foreach (@libraries_install) {
+            my $library = cleanfile($buildd, $_, $blddir);
+            if ($unified_info{rename}->{$library}) {
+                $library = $unified_info{rename}->{$library};
+            }
+            $unified_info{install}->{libraries}->{$library} = 1;
+        }
+
         die <<"EOF" if scalar @engines and !$config{dynamic_engines};
 ENGINES can only be used if configured with 'dynamic-engine'.
 This is usually a fault in a build.info file.
@@ -1543,6 +1587,14 @@ EOF
             $unified_info{engines}->{$library} = 1;
         }
 
+        foreach (@engines_install) {
+            my $library = cleanfile($buildd, $_, $blddir);
+            if ($unified_info{rename}->{$library}) {
+                $library = $unified_info{rename}->{$library};
+            }
+            $unified_info{install}->{engines}->{$library} = 1;
+        }
+
         foreach (@scripts) {
             my $script = cleanfile($buildd, $_, $blddir);
             if ($unified_info{rename}->{$script}) {
@@ -1551,6 +1603,14 @@ EOF
             $unified_info{scripts}->{$script} = 1;
         }
 
+        foreach (@scripts_install) {
+            my $script = cleanfile($buildd, $_, $blddir);
+            if ($unified_info{rename}->{$script}) {
+                $script = $unified_info{rename}->{$script};
+            }
+            $unified_info{install}->{scripts}->{$script} = 1;
+        }
+
         foreach (@extra) {
             my $extra = cleanfile($buildd, $_, $blddir);
             $unified_info{extra}->{$extra} = 1;
@@ -1749,7 +1809,7 @@ EOF
         $unified_info{$_} = [ sort keys %{$unified_info{$_}} ];
     }
     # Two level structures
-    foreach my $l1 (("sources", "shared_sources", "ldadd", "depends")) {
+    foreach my $l1 (("install", "sources", "shared_sources", "ldadd", "depends")) {
         foreach my $l2 (sort keys %{$unified_info{$l1}}) {
             $unified_info{$l1}->{$l2} =
                 [ sort keys %{$unified_info{$l1}->{$l2}} ];
diff --git a/engines/build.info b/engines/build.info
index e42684f..25917ff 100644
--- a/engines/build.info
+++ b/engines/build.info
@@ -8,7 +8,8 @@ IF[{- !$disabled{"engine"} -}]
       SOURCE[../libcrypto]=e_capi.c
     ENDIF
   ELSE
-    ENGINES=padlock dasync ossltest
+    ENGINES=padlock dasync
+    ENGINES_NO_INST=ossltest
     SOURCE[padlock]=e_padlock.c {- $target{padlock_asm_src} -}
     DEPEND[padlock]=../libcrypto
     INCLUDE[padlock]=../include
diff --git a/fuzz/build.info b/fuzz/build.info
index a3d3849..9d90bc7 100644
--- a/fuzz/build.info
+++ b/fuzz/build.info
@@ -9,7 +9,7 @@
 -}
 
 IF[{- !$disabled{"fuzz-afl"} || !$disabled{"fuzz-libfuzzer"} -}]
-  PROGRAMS=asn1 asn1parse bignum bndiv cms conf crl ct server x509
+  PROGRAMS_NO_INST=asn1 asn1parse bignum bndiv cms conf crl ct server x509
 
   SOURCE[asn1]=asn1.c driver.c
   INCLUDE[asn1]=../include {- $ex_inc -}
@@ -53,7 +53,7 @@ IF[{- !$disabled{"fuzz-afl"} || !$disabled{"fuzz-libfuzzer"} -}]
 ENDIF
 
 IF[{- !$disabled{tests} -}]
-  PROGRAMS=asn1-test asn1parse-test bignum-test bndiv-test cms-test conf-test crl-test ct-test server-test x509-test
+  PROGRAMS_NO_INST=asn1-test asn1parse-test bignum-test bndiv-test cms-test conf-test crl-test ct-test server-test x509-test
 
   SOURCE[asn1-test]=asn1.c test-corpus.c
   INCLUDE[asn1-test]=../include
diff --git a/test/build.info b/test/build.info
index 30f94a2..4e1ec65 100644
--- a/test/build.info
+++ b/test/build.info
@@ -1,5 +1,5 @@
 IF[{- !$disabled{tests} -}]
-  PROGRAMS=\
+  PROGRAMS_NO_INST=\
           aborttest \
           sanitytest bntest \
           ectest ecdsatest ecdhtest gmdifftest pbelutest ideatest \
@@ -275,7 +275,7 @@ IF[{- !$disabled{tests} -}]
        next if grep { $_ eq lc("$name.h") } @nogo_headers;
        $OUT .= <<"_____";
 
-  PROGRAMS=buildtest_$name
+  PROGRAMS_NO_INST=buildtest_$name
   GENERATE[buildtest_$name.c]=generate_buildtest.pl $name
   SOURCE[buildtest_$name]=buildtest_$name.c
   INCLUDE[buildtest_$name]=../include


More information about the openssl-commits mailing list