# The main targets ###################################################
-{- dependmagic('build_sw'); -} : build_libs_nodep, build_modules_nodep, build_programs_nodep copy-utils
+{- dependmagic('build_sw'); -} : build_libs_nodep, build_modules_nodep, build_programs_nodep
{- dependmagic('build_libs'); -} : build_libs_nodep
{- dependmagic('build_modules'); -} : build_modules_nodep
{- dependmagic('build_programs'); -} : build_programs_nodep
all : build_sw build_docs
test : tests
-{- dependmagic('tests'); -} : build_programs_nodep, build_modules_nodep copy-utils run_tests
+{- dependmagic('tests'); -} : build_programs_nodep, build_modules_nodep run_tests
run_tests :
@ ! {- output_off() if $disabled{tests}; "" -}
DEFINE SRCTOP "$(SRCDIR)"
@ IF "$(INSTALLTOP)" .EQS. "" THEN -
EXIT %x10000002
-# Helper targets #####################################################
-
-copy-utils : [.util]wrap.pl
-
-[.util]wrap.pl : configdata.pm
- @ IF "$(SRCDIR)" .NES. "$(BLDDIR)" THEN -
- CREATE/DIR/LOG [.util]
- @ IF "$(SRCDIR)" .NES. "$(BLDDIR)" THEN -
- COPY/LOG ossl_sourceroot:[util]wrap.pl [.util]
-
# Developer targets ##################################################
debug_logicals :
# Helper targets #####################################################
-link-utils: $(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/util/wrap.pl \
- $(BLDDIR)/apps/openssl.cnf
+link-utils: $(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/apps/openssl.cnf
-$(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/util/wrap.pl: configdata.pm
+$(BLDDIR)/util/opensslwrap.sh: configdata.pm
@if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \
mkdir -p "$(BLDDIR)/util"; \
ln -sf "../$(SRCDIR)/util/`basename "$@"`" "$(BLDDIR)/util"; \
rel2abs($config{builddir}));
return <<"EOF";
$script: $sources configdata.pm
+ \$(RM) "$script"
\$(PERL) "-I\$(BLDDIR)" -Mconfigdata "$dofile" \\
"-o$target{build_file}" $sources > "$script"
chmod a+x $script
# Helper targets #####################################################
-copy-utils: $(BLDDIR)\util\wrap.pl $(BLDDIR)\apps\openssl.cnf
-
-$(BLDDIR)\util\wrap.pl: configdata.pm
- @if NOT EXIST "$(BLDDIR)\util" mkdir "$(BLDDIR)\util"
- @if NOT "$(SRCDIR)"=="$(BLDDIR)" copy "$(SRCDIR)\util\$(@F)" "$(BLDDIR)\util"
+copy-utils: $(BLDDIR)\apps\openssl.cnf
$(BLDDIR)\apps\openssl.cnf: configdata.pm
@if NOT EXIST "$(BLDDIR)\apps" mkdir "$(BLDDIR)\apps"
SCRIPTS{noinst}=shlib_wrap.sh
SOURCE[shlib_wrap.sh]=shlib_wrap.sh.in
ENDIF
+SCRIPTS{noinst}=wrap.pl
+SOURCE[wrap.pl]=wrap.pl.in
+DEPEND[wrap.pl]=../configdata.pm
-#! /usr/bin/env perl
+#! {- $config{HASHBANGPERL} -}
use strict;
use warnings;
use File::Basename;
use File::Spec::Functions;
+BEGIN {
+ # This method corresponds exactly to 'use OpenSSL::Util',
+ # but allows us to use a platform specific file spec.
+ require {-
+ use Cwd qw(abs_path);
+
+ "'" . abs_path(catfile($config{sourcedir},
+ 'util', 'perl', 'OpenSSL', 'Util.pm')) . "'";
+ -};
+ OpenSSL::Util->import();
+}
+
my $there = canonpath(catdir(dirname($0), updir()));
my $std_engines = catdir($there, 'engines');
my $std_providers = catdir($there, 'providers');
my $use_system = 0;
my @cmd;
-if (-x $unix_shlib_wrap) {
+if ($^O eq 'VMS') {
+ # VMS needs the command to be appropriately quotified
+ @cmd = fixup_cmd(@ARGV);
+} elsif (-x $unix_shlib_wrap) {
@cmd = ( $unix_shlib_wrap, @ARGV );
} else {
# Hope for the best