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.
+VERBOSE=$(V)
VERSION={- $config{version} -}
MAJOR={- $config{major} -}
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].
DEPFLAG= /DEFINE=({- join(",", @{$config{depdefines}}) -})
LDFLAGS= {- $target{lflags} -}
EX_LIBS= {- $target{ex_libs} ? ",".$target{ex_libs} : "" -}{- $config{ex_libs} ? ",".$config{ex_libs} : "" -}
+LIB_CFLAGS={- $target{lib_cflags} || "" -}
+DSO_CFLAGS={- $target{dso_cflags} || "" -}
+BIN_CFLAGS={- $target{bin_cflags} || "" -}
PERL={- $config{perl} -}
# 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}; "" -}
DEFINE SRCTOP {- sourcedir() -}
DEFINE BLDTOP {- builddir() -}
DEFINE OPENSSL_ENGINES {- builddir("engines") -}
+ IF "$(VERBOSE)" .NES. "" THEN DEFINE VERBOSE "$(VERBOSE)"
$(PERL) {- sourcefile("test", "run_tests.pl") -} $(TESTS)
DEASSIGN OPENSSL_ENGINES
DEASSIGN BLDTOP
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;*
- DELETE [.test]*.LOG;*
- DELETE []*.MAP;*
+distclean : clean
+ - DELETE configdata.pm;*
+ - DELETE descrip.mms;*
+
depend : descrip.mms
descrip.mms : FORCE
@ ! {- output_off() if $disabled{makedepend}; "" -}
@ {- output_on() if $disabled{shared}; "" -} !
install_runtime : check_INSTALLTOP
+ @ ! {- output_off() if $disabled{apps}; "" -}
@ WRITE SYS$OUTPUT "*** Installing runtime files"
@ ! Install the main program
- CREATE/DIR ossl_installroot:[EXE.'arch']
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]
COPY/PROT=W:RE {- sourcefile("apps", "openssl-vms.cnf") -} -
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 -
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") -} -
WRITE CONFIG " OPENSSLDIR => '$(OPENSSLDIR)',"
WRITE CONFIG " pointersize => '","{- $target{pointersize} -}","',"
WRITE CONFIG " shared_libs => ["
- {- join("\n ", map { "WRITE CONFIG \" '$_'," } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) || "\@ !" -}
+ {- $disabled{shared}
+ ? "\@ !"
+ : join("\n ", map { "WRITE CONFIG \" '$_'," } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}})
+ -}
WRITE CONFIG " ],"
WRITE CONFIG ");"
WRITE CONFIG "our %target = ();"
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"
# 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 ###################################################
sub generatesrc {
my %args = @_;
my $generator = join(" ", @{$args{generator}});
- my $deps = join(", -\n\t\t", @{$args{deps}});
+ my $generator_incs = join("", map { ' "-I'.$_.'"' } @{$args{generator_incs}});
+ 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 > \$@
+ \$(PERL)$generator_incs $generator > \$@
EOF
+ }
} else {
die "No method to generate assembler source present.\n";
}
my $srcs =
join(", ",
map { abs2rel(rel2abs($_), rel2abs($forward)) } @{$args{srcs}});
+ my $ecflags = { lib => '$(LIB_CFLAGS)',
+ dso => '$(DSO_CFLAGS)',
+ bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
my $incs_on = "\@ !";
my $incs_off = "\@ !";
my $incs = "";
${before}
SET DEFAULT $forward
$incs_on
- \$(CC) \$(CFLAGS)${incs}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
+ \$(CC) \$(CFLAGS)${ecflags}${incs}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
$incs_off
SET DEFAULT $backward
${after}
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 -
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