VMS: Use different C flags for programs that aren't to be installed
authorRichard Levitte <levitte@openssl.org>
Thu, 8 Sep 2016 17:23:38 +0000 (19:23 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 8 Sep 2016 22:12:54 +0000 (00:12 +0200)
This is generalised by having the following macros for stuff that won't
be installed:

    NO_INST_LIB_CFLAGS, used instead of LIB_CFLAGS
    NO_INST_DSO_CFLAGS, used instead of DSO_CFLAGS
    NO_INST_BIN_CFLAGS, used instead of BIN_CFLAGS

They take values from corresponding target config fields if those are
defined, otherwise they take the respective values from LIB_CFLAGS,
DSO_CFLAGS and BIN_CFLAGS.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Configurations/10-main.conf
Configurations/descrip.mms.tmpl

index 463365deb02c9b0bae74fa5438b6ff3bebc8d12d..895385ffd32d01cf63436ab122a3e6bbc5368454 100644 (file)
@@ -1768,6 +1768,9 @@ sub vms_info {
                                    release => "/NODEBUG/NOTRACEBACK"),
         lib_cflags       => add("/NAMES=(AS_IS,SHORTENED)/EXTERN_MODEL=STRICT_REFDEF"),
         dso_cflags       => add("/NAMES=(AS_IS,SHORTENED)"),
+        # no_inst_bin_cflags is used instead of bin_cflags by descrip.mms.tmpl
+        # for object files belonging to selected internal programs
+        no_inst_bin_cflags => "/NAMES=(AS_IS,SHORTENED)",
         shared_target    => "vms-shared",
         dso_scheme       => "vms",
         thread_scheme    => "pthreads",
index ce96778fe8537e4b6df4692cde3582bfebd329ed..108ab5d32d875706f30753653150caf2661fea6a 100644 (file)
@@ -168,6 +168,9 @@ EX_LIBS= {- $target{ex_libs} ? ",".$target{ex_libs} : "" -}{- $config{ex_libs} ?
 LIB_CFLAGS={- $target{lib_cflags} || "" -}
 DSO_CFLAGS={- $target{dso_cflags} || "" -}
 BIN_CFLAGS={- $target{bin_cflags} || "" -}
+NO_INST_LIB_CFLAGS={- $target{no_inst_lib_cflags} || '$(LIB_CFLAGS)' -}
+NO_INST_DSO_CFLAGS={- $target{no_inst_dso_cflags} || '$(DSO_CFLAGS)' -}
+NO_INST_BIN_CFLAGS={- $target{no_inst_bin_cflags} || '$(BIN_CFLAGS)' -}
 
 PERL={- $config{perl} -}
 
@@ -567,9 +570,16 @@ EOF
       my $srcs =
           join(", ",
                map { abs2rel(rel2abs($_), rel2abs($forward)) } @{$args{srcs}});
-      my $ecflags = { lib => '$(LIB_CFLAGS)',
-                      dso => '$(DSO_CFLAGS)',
-                      bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
+      my $ecflags;
+      if ($args{installed}) {
+          $ecflags = { lib => '$(LIB_CFLAGS)',
+                       dso => '$(DSO_CFLAGS)',
+                       bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
+      } else {
+          $ecflags = { lib => '$(NO_INST_LIB_CFLAGS)',
+                       dso => '$(NO_INST_DSO_CFLAGS)',
+                       bin => '$(NO_INST_BIN_CFLAGS)' } -> {$args{intent}};
+      }
       my $incs_on = "\@ !";
       my $incs_off = "\@ !";
       my $incs = "";