Build: Change all _NO_INST to use attributes instead.
authorRichard Levitte <levitte@openssl.org>
Wed, 7 Nov 2018 10:02:06 +0000 (11:02 +0100)
committerRichard Levitte <levitte@openssl.org>
Tue, 22 Jan 2019 11:35:39 +0000 (12:35 +0100)
This means that all PROGRAMS_NO_INST, LIBS_NO_INST, ENGINES_NO_INST
and SCRIPTS_NO_INST are changed to be PROGRAM, LIBS, ENGINES and
SCRIPTS with the associated attribute 'noinst'.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7581)

Configurations/descrip.mms.tmpl
Configurations/unix-Makefile.tmpl
Configurations/windows-makefile.tmpl
apps/build.info
engines/build.info
fuzz/build.info
test/build.info
test/ossl_shim/build.info
util/build.info

index ebafcc7..f87de15 100644 (file)
       @{$unified_info{libraries}};
   our @install_libs =
       map { platform->staticname($_) }
-      @{$unified_info{install}->{libraries}};
+      grep { !$unified_info{attributes}->{$_}->{noinst} }
+      @{$unified_info{libraries}};
   our @install_shlibs =
       map { platform->sharedname($_) // () }
-      @{$unified_info{install}->{libraries}};
+      grep { !$unified_info{attributes}->{$_}->{noinst} }
+      @{$unified_info{libraries}};
+  our @install_engines =
+      grep { !$unified_info{attributes}->{$_}->{noinst} }
+      @{$unified_info{engines}};
+  our @install_programs =
+      grep { !$unified_info{attributes}->{$_}->{noinst} }
+      @{$unified_info{programs}};
 
   # This is a horrible hack, but is needed because recursive inclusion of files
   # in different directories does not work well with HP C.
@@ -124,8 +132,8 @@ GENERATED={- # common0.tmpl provides @generated
 
 INSTALL_LIBS={- join(", ", map { "-\n\t".$_.".OLB" } @install_libs) -}
 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}}) -}
+INSTALL_ENGINES={- join(", ", map { "-\n\t".$_.".EXE" } @install_engines) -}
+INSTALL_PROGRAMS={- join(", ", map { "-\n\t".$_.".EXE" } @install_programs) -}
 {- output_off() if $disabled{apps}; "" -}
 BIN_SCRIPTS=[.tools]c_rehash.pl
 MISC_SCRIPTS=[.apps]CA.pl, [.apps]tsget.pl
@@ -552,7 +560,7 @@ install_engines : check_INSTALLTOP install_runtime_libs build_engines
         - CREATE/DIR ossl_installroot:[ENGINES{- $sover_dirname.$target{pointer_size} -}.'arch']
         {- join("\n        ",
                 map { "COPY/PROT=W:RE $_.EXE ossl_installroot:[ENGINES$sover_dirname$target{pointer_size}.'arch']" }
-                @{$unified_info{install}->{engines}}) -}
+                @install_engines) -}
         @ {- output_on() unless scalar @{$unified_info{engines}}; "" -} !
 
 install_runtime : install_programs
index 4c76b8d..e197e1a 100644 (file)
@@ -52,14 +52,33 @@ GENERATED_MANDATORY={- join(" ", @{$unified_info{depends}->{""}}) -}
 GENERATED={- # common0.tmpl provides @generated
              join(" ", map { platform->convertext($_) } @generated ) -}
 
-INSTALL_LIBS={- join(" ", map { platform->staticlib($_) // () } @{$unified_info{install}->{libraries}}) -}
-INSTALL_SHLIBS={- join(" ", map { platform->sharedlib($_) // () } @{$unified_info{install}->{libraries}}) -}
-INSTALL_SHLIB_INFO={- join(" ", map { my $x = platform->sharedlib($_);
-                                      my $y = platform->sharedlib_simple($_);
-                                      $x ? "\"$x;$y\"" : () }
-                                @{$unified_info{install}->{libraries}}) -}
-INSTALL_ENGINES={- join(" ", map { platform->dso($_) } @{$unified_info{install}->{engines}}) -}
-INSTALL_PROGRAMS={- join(" ", map { platform->bin($_) } @{$unified_info{install}->{programs}}) -}
+INSTALL_LIBS={-
+        join(" ", map { platform->staticlib($_) // () }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{libraries}})
+-}
+INSTALL_SHLIBS={-
+        join(" ", map { platform->sharedlib($_) // () }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{libraries}})
+-}
+INSTALL_SHLIB_INFO={-
+        join(" ", map { my $x = platform->sharedlib($_);
+                        my $y = platform->sharedlib_simple($_);
+                        $x ? "\"$x;$y\"" : () }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{libraries}})
+-}
+INSTALL_ENGINES={-
+        join(" ", map { platform->dso($_) }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{engines}})
+-}
+INSTALL_PROGRAMS={-
+        join(" ", map { platform->bin($_) }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{programs}})
+-}
 {- output_off() if $disabled{apps}; "" -}
 BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
 MISC_SCRIPTS=$(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget.pl:tsget
index 97e59c3..e114d6b 100644 (file)
@@ -59,15 +59,44 @@ GENERATED_MANDATORY={- join(" ", @{$unified_info{depends}->{""}} ) -}
 GENERATED={- # common0.tmpl provides @generated
              join(" ", map { platform->convertext($_) } @generated) -}
 
-INSTALL_LIBS={- join(" ", map { quotify1(platform->sharedlib_import($_) // platform->staticlib($_)) } @{$unified_info{install}->{libraries}}) -}
-INSTALL_SHLIBS={- join(" ", map { my $x = platform->sharedlib($_);
-                                  $x ? quotify_l($x) : () } @{$unified_info{install}->{libraries}}) -}
-INSTALL_SHLIBPDBS={- join(" ", map { my $x = platform->sharedlibpdb($_);
-                                     $x ? quotify_l($x) : () } @{$unified_info{install}->{libraries}}) -}
-INSTALL_ENGINES={- join(" ", map { quotify1(platform->dso($_)) } @{$unified_info{install}->{engines}}) -}
-INSTALL_ENGINEPDBS={- join(" ", map { quotify1(platform->dsopdb($_)) } @{$unified_info{install}->{engines}}) -}
-INSTALL_PROGRAMS={- join(" ", map { quotify1(platform->bin($_)) } grep { !m|^test\\| } @{$unified_info{install}->{programs}}) -}
-INSTALL_PROGRAMPDBS={- join(" ", map { quotify1(platform->binpdb($_)) } grep { !m|^test\\| } @{$unified_info{install}->{programs}}) -}
+INSTALL_LIBS={-
+        join(" ", map { quotify1(platform->sharedlib_import($_)
+                                 // platform->staticlib($_)) }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{libraries}})
+-}
+INSTALL_SHLIBS={-
+        join(" ", map { my $x = platform->sharedlib($_);
+                        $x ? quotify_l($x) : () }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{libraries}})
+-}
+INSTALL_SHLIBPDBS={-
+        join(" ", map { my $x = platform->sharedlibpdb($_);
+                        $x ? quotify_l($x) : () }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{libraries}})
+-}
+INSTALL_ENGINES={-
+        join(" ", map { quotify1(platform->dso($_)) }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{engines}})
+-}
+INSTALL_ENGINEPDBS={-
+        join(" ", map { quotify1(platform->dsopdb($_)) }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{engines}})
+-}
+INSTALL_PROGRAMS={-
+        join(" ", map { quotify1(platform->bin($_)) }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{programs}})
+-}
+INSTALL_PROGRAMPDBS={-
+        join(" ", map { quotify1(platform->binpdb($_)) }
+                  grep { !$unified_info{attributes}->{$_}->{noinst} }
+                  @{$unified_info{programs}})
+-}
 {- output_off() if $disabled{apps}; "" -}
 BIN_SCRIPTS="$(BLDDIR)\tools\c_rehash.pl"
 MISC_SCRIPTS="$(BLDDIR)\apps\CA.pl" "$(BLDDIR)\apps\tsget.pl"
index 751d8da..de35687 100644 (file)
@@ -12,7 +12,7 @@
    our @apps_init_src = split(/\s+/, $target{apps_init_src});
    "" -}
 IF[{- !$disabled{apps} -}]
-  LIBS_NO_INST=libapps.a
+  LIBS{noinst}=libapps.a
   SOURCE[libapps.a]={- join(" ", @apps_lib_src) -}
   INCLUDE[libapps.a]=.. ../include
 
index 5373006..a4a4d93 100644 (file)
@@ -40,7 +40,7 @@ IF[{- !$disabled{"engine"} -}]
       ENDIF
     ENDIF
 
-    ENGINES_NO_INST=ossltest dasync
+    ENGINES{noinst}=ossltest dasync
     SOURCE[dasync]=e_dasync.c
     DEPEND[dasync]=../libcrypto
     INCLUDE[dasync]=../include
index cde03d3..0b65ee0 100644 (file)
@@ -9,14 +9,14 @@
 -}
 
 IF[{- !$disabled{"fuzz-afl"} || !$disabled{"fuzz-libfuzzer"} -}]
-  PROGRAMS_NO_INST=asn1 asn1parse bignum bndiv client conf crl server x509
+  PROGRAMS{noinst}=asn1 asn1parse bignum bndiv client conf crl server x509
 
   IF[{- !$disabled{"cms"} -}]
-    PROGRAMS_NO_INST=cms
+    PROGRAMS{noinst}=cms
   ENDIF
 
   IF[{- !$disabled{"ct"} -}]
-    PROGRAMS_NO_INST=ct
+    PROGRAMS{noinst}=ct
   ENDIF
 
   SOURCE[asn1]=asn1.c driver.c
@@ -65,14 +65,14 @@ IF[{- !$disabled{"fuzz-afl"} || !$disabled{"fuzz-libfuzzer"} -}]
 ENDIF
 
 IF[{- !$disabled{tests} -}]
-  PROGRAMS_NO_INST=asn1-test asn1parse-test bignum-test bndiv-test client-test conf-test crl-test server-test x509-test
+  PROGRAMS{noinst}=asn1-test asn1parse-test bignum-test bndiv-test client-test conf-test crl-test server-test x509-test
 
   IF[{- !$disabled{"cms"} -}]
-    PROGRAMS_NO_INST=cms-test
+    PROGRAMS{noinst}=cms-test
   ENDIF
 
   IF[{- !$disabled{"ct"} -}]
-    PROGRAMS_NO_INST=ct-test
+    PROGRAMS{noinst}=ct-test
   ENDIF
 
   SOURCE[asn1-test]=asn1.c test-corpus.c
index 2e17a5f..a7d31d4 100644 (file)
@@ -9,7 +9,7 @@ SUBDIRS=ossl_shim
      ""
 -}
 IF[{- !$disabled{tests} -}]
-  LIBS_NO_INST=libtestutil.a
+  LIBS{noinst}=libtestutil.a
   SOURCE[libtestutil.a]=testutil/basic_output.c testutil/output_helpers.c \
           testutil/driver.c testutil/tests.c testutil/cb.c testutil/stanza.c \
           testutil/format_output.c testutil/tap_bio.c \
@@ -24,7 +24,7 @@ IF[{- !$disabled{tests} -}]
 INCLUDE_MAIN___test_libtestutil_OLB = /INCLUDE=main
   ENDRAW[descrip.mms]
 
-  PROGRAMS_NO_INST=\
+  PROGRAMS{noinst}=\
           versions \
           aborttest test_test \
           sanitytest rsa_complex exdatatest bntest \
@@ -379,27 +379,27 @@ INCLUDE_MAIN___test_libtestutil_OLB = /INCLUDE=main
   DEPEND[servername_test]=../libcrypto ../libssl libtestutil.a
 
   IF[{- !$disabled{cms} -}]
-    PROGRAMS_NO_INST=cmsapitest
+    PROGRAMS{noinst}=cmsapitest
     SOURCE[cmsapitest]=cmsapitest.c
     INCLUDE[cmsapitest]=../include
     DEPEND[cmsapitest]=../libcrypto libtestutil.a
   ENDIF
 
   IF[{- !$disabled{psk} -}]
-    PROGRAMS_NO_INST=dtls_mtu_test
+    PROGRAMS{noinst}=dtls_mtu_test
     SOURCE[dtls_mtu_test]=dtls_mtu_test.c ssltestlib.c
     INCLUDE[dtls_mtu_test]=.. ../include
     DEPEND[dtls_mtu_test]=../libcrypto ../libssl libtestutil.a
   ENDIF
 
   IF[{- !$disabled{shared} -}]
-    PROGRAMS_NO_INST=shlibloadtest
+    PROGRAMS{noinst}=shlibloadtest
     SOURCE[shlibloadtest]=shlibloadtest.c
     INCLUDE[shlibloadtest]=../include ../crypto/include
   ENDIF
 
   IF[{- $disabled{shared} -}]
-    PROGRAMS_NO_INST=cipher_overhead_test
+    PROGRAMS{noinst}=cipher_overhead_test
     SOURCE[cipher_overhead_test]=cipher_overhead_test.c
     INCLUDE[cipher_overhead_test]=.. ../include
     DEPEND[cipher_overhead_test]=../libcrypto ../libssl libtestutil.a
@@ -442,26 +442,26 @@ INCLUDE_MAIN___test_libtestutil_OLB = /INCLUDE=main
   # programs are forcibly linked with the static libraries, where all symbols
   # are always available.
   IF[1]
-    PROGRAMS_NO_INST=asn1_internal_test modes_internal_test x509_internal_test \
+    PROGRAMS{noinst}=asn1_internal_test modes_internal_test x509_internal_test \
                      tls13encryptiontest wpackettest ctype_internal_test \
                      rdrand_sanitytest
     IF[{- !$disabled{poly1305} -}]
-      PROGRAMS_NO_INST=poly1305_internal_test
+      PROGRAMS{noinst}=poly1305_internal_test
     ENDIF
     IF[{- !$disabled{chacha} -}]
-      PROGRAMS_NO_INST=chacha_internal_test
+      PROGRAMS{noinst}=chacha_internal_test
     ENDIF
     IF[{- !$disabled{siphash} -}]
-      PROGRAMS_NO_INST=siphash_internal_test
+      PROGRAMS{noinst}=siphash_internal_test
     ENDIF
     IF[{- !$disabled{sm2} -}]
-      PROGRAMS_NO_INST=sm2_internal_test
+      PROGRAMS{noinst}=sm2_internal_test
     ENDIF
     IF[{- !$disabled{sm4} -}]
-      PROGRAMS_NO_INST=sm4_internal_test
+      PROGRAMS{noinst}=sm4_internal_test
     ENDIF
     IF[{- !$disabled{ec} -}]
-      PROGRAMS_NO_INST=curve448_internal_test
+      PROGRAMS{noinst}=curve448_internal_test
     ENDIF
 
     SOURCE[poly1305_internal_test]=poly1305_internal_test.c
@@ -518,14 +518,14 @@ INCLUDE_MAIN___test_libtestutil_OLB = /INCLUDE=main
   ENDIF
 
   IF[{- !$disabled{mdc2} -}]
-    PROGRAMS_NO_INST=mdc2_internal_test
+    PROGRAMS{noinst}=mdc2_internal_test
   ENDIF
 
   SOURCE[mdc2_internal_test]=mdc2_internal_test.c
   INCLUDE[mdc2_internal_test]=.. ../include
   DEPEND[mdc2_internal_test]=../libcrypto libtestutil.a
 
-  PROGRAMS_NO_INST=asn1_time_test
+  PROGRAMS{noinst}=asn1_time_test
   SOURCE[asn1_time_test]=asn1_time_test.c
   INCLUDE[asn1_time_test]=../include
   DEPEND[asn1_time_test]=../libcrypto libtestutil.a
@@ -534,7 +534,7 @@ INCLUDE_MAIN___test_libtestutil_OLB = /INCLUDE=main
   # redefines some internal libssl symbols. This doesn't work in a non-shared
   # build
   IF[{- !$disabled{shared} -}]
-    PROGRAMS_NO_INST=tls13secretstest
+    PROGRAMS{noinst}=tls13secretstest
     SOURCE[tls13secretstest]=tls13secretstest.c
     SOURCE[tls13secretstest]= ../ssl/tls13_enc.c ../ssl/packet.c
     INCLUDE[tls13secretstest]=.. ../include
@@ -578,7 +578,7 @@ ENDIF
        next if grep { lc("$name.h") =~ m/$_/i } @nogo_headers_re;
        $OUT .= <<"_____";
 
-  PROGRAMS_NO_INST=buildtest_$name
+  PROGRAMS{noinst}=buildtest_$name
   GENERATE[buildtest_$name.c]=generate_buildtest.pl $name
   SOURCE[buildtest_$name]=buildtest_$name.c
   INCLUDE[buildtest_$name]=../include
index 1225060..d1dd208 100644 (file)
@@ -1,5 +1,5 @@
 IF[{- defined $target{CXX} && !$disabled{"external-tests"} -}]
-  PROGRAMS_NO_INST=ossl_shim
+  PROGRAMS{noinst}=ossl_shim
   SOURCE[ossl_shim]=ossl_shim.cc async_bio.cc packeted_bio.cc test_config.cc
   INCLUDE[ossl_shim]=. include ../../include
   DEPEND[ossl_shim]=../../libssl ../../libcrypto
index 609be51..65e17a9 100644 (file)
@@ -1,8 +1,8 @@
 IF[{- $target{build_scheme}->[1] eq "VMS" -}]
- SCRIPTS_NO_INST=local_shlib.com unlocal_shlib.com
+ SCRIPTS{noinst}=local_shlib.com unlocal_shlib.com
  SOURCE[local_shlib.com]=local_shlib.com.in
  SOURCE[unlocal_shlib.com]=unlocal_shlib.com.in
 ELSIF[{- $target{build_scheme}->[1] eq "unix" -}]
- SCRIPTS_NO_INST=shlib_wrap.sh
+ SCRIPTS{noinst}=shlib_wrap.sh
  SOURCE[shlib_wrap.sh]=shlib_wrap.sh.in
 ENDIF