VMS: use BLDDIR rather than BUILDDIR in descrip.mms.tmpl
[openssl.git] / Configurations / descrip.mms.tmpl
index 6d08ae8cad3c5858c69d3cfe202f0801e4737cda..201bef6c664ae6f70f65e14c5101eb8f5fecc260 100644 (file)
@@ -80,7 +80,7 @@ PLATFORM={- $config{target} -}
 OPTIONS={- $config{options} -}
 CONFIGURE_ARGS=({- join(", ",quotify_l(@{$config{perlargv}})) -})
 SRCDIR={- $config{sourcedir} -}
-BUILDDIR={- $config{builddir} -}
+BLDDIR={- $config{builddir} -}
 
 # Allow both V and VERBOSE to indicate verbosity.  This only applies
 # to testing.
@@ -113,6 +113,12 @@ DEPS={- our @deps = map { (my $x = $_) =~ s|\.o$|\$(DEP_EXT)|; $x; }
                     keys %{$unified_info{sources}};
         join(", ", map { "-\n\t".$_ } @deps); -}
 {- output_on() if $disabled{makedepend}; "" -}
+GENERATED_MANDATORY={- join(",", @{$unified_info{depends}->{""}} ) -}
+
+{- output_off() if $disabled{apps}; "" -}
+BIN_SCRIPTS=[.tools]c_rehash.pl
+MISC_SCRIPTS=[.apps]CA.pl, [.apps]tsget.pl
+{- output_on() if $disabled{apps}; "" -}
 
 # DESTDIR is for package builders so that they can configure for, say,
 # SYS$COMMON:[OPENSSL] and yet have everything installed in STAGING:[USER].
@@ -217,20 +223,22 @@ NODEBUG=@
 
 # The main targets ###################################################
 
-all : configdata.pm, -
+all : build_generated, -
       build_libs_nodep, build_engines_nodep, build_apps_nodep, -
       depend
 
-build_libs : configdata.pm, build_libs_nodep, depend
+build_libs : build_generated, build_libs_nodep, depend
 build_libs_nodep : $(LIBS)
-build_engines : configdata.pm, build_engines_nodep, depend
+build_engines : build_generated, build_engines_nodep, depend
 build_engines_nodep : $(ENGINES)
-build_apps : configdata.pm, build_apps_nodep, depend
+build_apps : build_generated, build_apps_nodep, depend
 build_apps_nodep : $(PROGRAMS), $(SCRIPTS)
-build_tests : configdata.pm, build_tests_nodep, depend
+build_tests : build_generated, build_tests_nodep, depend
 build_tests_nodep : $(TESTPROGS)
 
-test tests : configdata.pm, -
+build_generated : $(GENERATED_MANDATORY)
+
+test tests : build_generated, -
              build_apps_nodep, build_engines_nodep, build_tests_nodep, -
              depend
         @ ! {- output_off() if $disabled{tests}; "" -}
@@ -288,6 +296,7 @@ install : install_sw install_docs
 uninstall : uninstall_docs uninstall_sw
 
 clean : libclean
+        - DELETE {- join(",", map { "$_;*" } @{$unified_info{depends}->{""}} ) -}
         - DELETE []OSSL$LIB*.EXE;*,OSSL$LIB*.MAP;*,OSSL$LIB*.OPT;*
         - DELETE [.engines...]LIB*.EXE;*,LIB*.MAP;*,LIB*.OPT;*
         - DELETE [.apps]*.EXE;*,*.MAP;*,*.OPT;*
@@ -297,6 +306,10 @@ clean : libclean
         - DELETE [.test]*.LOG;*
         - DELETE []*.MAP;*
 
+distclean : clean
+        - DELETE configdata.pm;*
+        - DELETE descrip.mms;*
+
 depend : descrip.mms
 descrip.mms : FORCE
        @ ! {- output_off() if $disabled{makedepend}; "" -}
@@ -347,8 +360,7 @@ install_runtime : check_INSTALLTOP
         COPY/PROT=W:RE [.APPS]openssl.EXE ossl_installroot:[EXE.'arch']
         @ ! Install scripts
         - CREATE/DIR ossl_installroot:[EXE]
-        COPY/PROT=W:RE [.APPS]CA.pl ossl_installroot:[EXE]
-        COPY/PROT=W:RE [.TOOLS]c_rehash. ossl_installroot:[EXE]c_rehash.pl
+        COPY/PROT=W:RE $(BIN_SCRIPTS) ossl_installroot:[EXE]
         @ ! {- output_on() if $disabled{apps}; "" -}
         @ ! Install configuration file
         - CREATE/DIR ossl_dataroot:[000000]
@@ -370,6 +382,8 @@ install_config : [.VMS]openssl_startup.com [.VMS]openssl_shutdown.com -
                 CREATE/DIR/PROT=(S:RWED,O:RWE,G:RE,W:RE) OSSL_DATAROOT:[CERTS]
         IF F$SEARCH("OSSL_DATAROOT:[000000]PRIVATE.DIR;1") .EQS. "" THEN -
                 CREATE/DIR/PROT=(S:RWED,O:RWE,G,W) OSSL_DATAROOT:[PRIVATE]
+        IF F$SEARCH("OSSL_DATAROOT:[000000]MISC.DIR;1") .EQS. "" THEN -
+                CREATE/DIR/PROT=(S:RWED,O:RWE,G,W) OSSL_DATAROOT:[MISC]
         - CREATE/DIR ossl_installroot:[SYS$STARTUP]
         COPY/PROT=W:RE -
                 [.VMS]openssl_startup.com,openssl_shutdown.com -
@@ -377,14 +391,15 @@ install_config : [.VMS]openssl_startup.com [.VMS]openssl_shutdown.com -
         COPY/PROT=W:RE -
                 {- sourcefile("VMS", "openssl_utils.com") -} -
                 ossl_installroot:[SYS$STARTUP]
+        COPY/PROT=W:RE $(MISC_SCRIPTS) OSSL_DATAROOT:[MISC]
 
-[.VMS]openssl_startup.com : vmsconfig.pm
+[.VMS]openssl_startup.com : vmsconfig.pm {- sourcefile("VMS", "openssl_startup.com.in") -}
         - CREATE/DIR [.VMS]
         $(PERL) "-I." "-Mvmsconfig" {- sourcefile("util", "dofile.pl") -} -
                 {- sourcefile("VMS", "openssl_startup.com.in") -} -
                 > [.VMS]openssl_startup.com
 
-[.VMS]openssl_shutdown.com : vmsconfig.pm
+[.VMS]openssl_shutdown.com : vmsconfig.pm {- sourcefile("VMS", "openssl_shutdown.com.in") -}
         - CREATE/DIR [.VMS]
         $(PERL) "-I." "-Mvmsconfig" {- sourcefile("util", "dofile.pl") -} -
                 {- sourcefile("VMS", "openssl_shutdown.com.in") -} -
@@ -418,6 +433,10 @@ vmsconfig.pm : configdata.pm
         WRITE CONFIG "1;"
         CLOSE CONFIG
 
+install_html_docs : check_INSTALLTOP
+        @ $(PERL) {- sourcefile("util", "process_docs.pl") -} -
+                --destdir=ossl_installroot:[HTML] --type=html
+
 check_INSTALLTOP :
         @ IF "$(INSTALLTOP)" .EQS. "" THEN -
                 WRITE SYS$ERROR "INSTALLTOP should not be empty"
@@ -429,9 +448,7 @@ check_INSTALLTOP :
 # Developer targets ##################################################
 
 debug_logicals :
-        SH LOGICAL/PROC openssl,internal,ossl_installroot
-        IF "$(DESTDIR)" .EQS. "" THEN -
-                SH LOGICAL/PROC ossl_dataroot
+        SH LOGICAL/PROC openssl,internal,ossl_installroot,ossl_dataroot
 
 # Building targets ###################################################
 
@@ -456,10 +473,21 @@ configdata.pm : {- join(" ", sourcefile("Configurations", "descrip.mms.tmpl"), s
       my $deps = join(", -\n\t\t", @{$args{generator_deps}}, @{$args{deps}});
 
       if ($args{src} !~ /\.[sS]$/) {
-          return <<"EOF";
+          if ($args{generator}->[0] =~ m|^.*\.in$|) {
+             my $dofile = abs2rel(rel2abs(catfile($config{sourcedir},
+                                                   "util", "dofile.pl")),
+                                   rel2abs($config{builddir}));
+              return <<"EOF";
+$args{src} : $args{generator}->[0] $deps
+       \$(PERL) "-I\$(BLDDIR)" "-Mconfigdata" $dofile \\
+           "-o$target{build_file}" $generator > \$@
+EOF
+         } else {
+              return <<"EOF";
 $args{src} : $args{generator}->[0] $deps
        \$(PERL)$generator_incs $generator > \$@
 EOF
+         }
       } else {
           die "No method to generate assembler source present.\n";
       }
@@ -563,7 +591,7 @@ $shlib.EXE : $lib.OLB $deps $ordinalsfile
         IF "$mkdef_key" .EQS. "ssl" .OR. "$mkdef_key" .EQS. "crypto" THEN -
            \$(PERL) $mkdef_pl "$mkdef_key" "VMS" > $shlib.SYMVEC-tmp
         IF "$mkdef_key" .EQS. "ssl" .OR. "$mkdef_key" .EQS. "crypto" THEN -
-           \$(PERL) $translatesyms_pl \$(BUILDDIR)CXX\$DEMANGLER_DB. < $shlib.SYMVEC-tmp > $shlib.SYMVEC
+           \$(PERL) $translatesyms_pl \$(BLDDIR)CXX\$DEMANGLER_DB. < $shlib.SYMVEC-tmp > $shlib.SYMVEC
         OPEN/WRITE/SHARE=READ OPT_FILE $shlib.OPT
         WRITE OPT_FILE "IDENTIFICATION=""V$config{version}"""
         IF "$mkdef_key" .NES. "ssl" .AND. "$mkdef_key" .NES. "crypto" THEN -
@@ -671,7 +699,7 @@ EOF
                            rel2abs($config{builddir}));
       return <<"EOF";
 $script : $sources
-        \$(PERL) "-I\$(BUILDDIR)" "-Mconfigdata" $dofile -
+        \$(PERL) "-I\$(BLDDIR)" "-Mconfigdata" $dofile -
            "-o$target{build_file}" $sources > $script
         SET FILE/PROT=(S:RWED,O:RWED,G:RE,W:RE) $script
         PURGE $script