From c3845ceba84aab9ddeb43f043549238fd10de63b Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 17 Feb 2020 15:20:57 +0100 Subject: [PATCH] Build file templates: don't set OPENSSL_{ENGINES,MODULES} Since we've now switched to use util/wrap.pl to wrap uninstalled programs everywhere, there's no need to set the environment variables OPENSSL_ENGINES and OPENSSL_MODULES globally for the tests. Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/11110) --- Configurations/descrip.mms.tmpl | 19 +++++++++++++------ Configurations/unix-Makefile.tmpl | 8 +++----- Configurations/windows-makefile.tmpl | 14 ++++++++++---- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl index 5b2936dea0..bf22e40dc4 100644 --- a/Configurations/descrip.mms.tmpl +++ b/Configurations/descrip.mms.tmpl @@ -351,6 +351,9 @@ CPPFLAGS_Q={- (my $c = $lib_cppflags.$cppflags2.$cppflags1) =~ s|"|""|g; # given with /INCLUDE is a fantasy, unfortunately. NODEBUG=@ .FIRST : + $(NODEBUG) sourcetop = F$PARSE("$(SRCDIR)","[]A.;",,"SYNTAX_ONLY,NO_CONCEAL") - ".][000000" - "[000000." - "][" - "]A.;" + ".]" + $(NODEBUG) DEFINE ossl_sourceroot 'sourcetop' + $(NODEBUG) ! $(NODEBUG) openssl_inc1 = F$PARSE("[.include.openssl]","A.;",,,"syntax_only") - "A.;" $(NODEBUG) openssl_inc2 = F$PARSE("{- catdir($config{sourcedir},"[.include.openssl]") -}","A.;",,,"SYNTAX_ONLY") - "A.;" $(NODEBUG) internal_inc1 = F$PARSE("[.crypto.include.internal]","A.;",,,"SYNTAX_ONLY") - "A.;" @@ -401,7 +404,7 @@ NODEBUG=@ # The main targets ################################################### -{- dependmagic('build_sw'); -} : build_libs_nodep, build_modules_nodep, build_programs_nodep +{- dependmagic('build_sw'); -} : build_libs_nodep, build_modules_nodep, build_programs_nodep copy-utils {- dependmagic('build_libs'); -} : build_libs_nodep {- dependmagic('build_modules'); -} : build_modules_nodep {- dependmagic('build_programs'); -} : build_programs_nodep @@ -429,16 +432,12 @@ build_all_generated : $(GENERATED_MANDATORY) $(GENERATED) build_docs all : build_sw build_docs test : tests -{- dependmagic('tests'); -} : build_programs_nodep, build_modules_nodep +{- dependmagic('tests'); -} : build_programs_nodep, build_modules_nodep copy-utils @ ! {- output_off() if $disabled{tests}; "" -} DEFINE SRCTOP {- sourcedir() -} DEFINE BLDTOP {- builddir() -} - DEFINE OPENSSL_ENGINES {- builddir("engines") -} - DEFINE OPENSSL_MODULES {- builddir("providers") -} IF "$(VERBOSE)" .NES. "" THEN DEFINE VERBOSE "$(VERBOSE)" $(PERL) {- sourcefile("test", "run_tests.pl") -} $(TESTS) - DEASSIGN OPENSSL_MODULES - DEASSIGN OPENSSL_ENGINES DEASSIGN BLDTOP DEASSIGN SRCTOP @ ! {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -} @@ -684,6 +683,14 @@ check_INSTALLTOP : # 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 : diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 51ba10f62a..ac24687609 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -468,8 +468,6 @@ test: tests BLDTOP=$(BLDDIR) \ PERL="$(PERL)" \ EXE_EXT={- platform->binext() -} \ - OPENSSL_ENGINES=`cd $(BLDDIR)/engines 2>/dev/null && pwd` \ - OPENSSL_MODULES=`cd $(BLDDIR)/providers 2>/dev/null && pwd` \ $(PERL) $(SRCDIR)/test/run_tests.pl $(TESTS) ) @ : {- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -} @echo "Tests are not supported with your chosen Configure options" @@ -1080,12 +1078,12 @@ tar: # Helper targets ##################################################### -link-utils: $(BLDDIR)/util/opensslwrap.sh +link-utils: $(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/util/wrap.pl -$(BLDDIR)/util/opensslwrap.sh: configdata.pm +$(BLDDIR)/util/opensslwrap.sh $(BLDDIR)/util/wrap.pl: configdata.pm @if [ "$(SRCDIR)" != "$(BLDDIR)" ]; then \ mkdir -p "$(BLDDIR)/util"; \ - ln -sf "../$(SRCDIR)/util/opensslwrap.sh" "$(BLDDIR)/util"; \ + ln -sf "../$(SRCDIR)/util/`basename "$@"`" "$(BLDDIR)/util"; \ fi FORCE: diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl index afc386daec..859d3a6324 100644 --- a/Configurations/windows-makefile.tmpl +++ b/Configurations/windows-makefile.tmpl @@ -357,7 +357,7 @@ PROCESSOR= {- $config{processor} -} # The main targets ################################################### -{- dependmagic('build_sw'); -}: build_libs_nodep build_modules_nodep build_programs_nodep +{- dependmagic('build_sw'); -}: build_libs_nodep build_modules_nodep build_programs_nodep copy-utils {- dependmagic('build_libs'); -}: build_libs_nodep {- dependmagic('build_modules'); -}: build_modules_nodep {- dependmagic('build_programs'); -}: build_programs_nodep @@ -385,13 +385,11 @@ build_all_generated: $(GENERATED_MANDATORY) $(GENERATED) build_docs all: build_sw build_docs test: tests -{- dependmagic('tests'); -}: build_programs_nodep build_modules_nodep +{- dependmagic('tests'); -}: build_programs_nodep build_modules_nodep copy-utils @{- output_off() if $disabled{tests}; "" -} set SRCTOP=$(SRCDIR) set BLDTOP=$(BLDDIR) set PERL=$(PERL) - set OPENSSL_ENGINES=$(MAKEDIR)\engines - set OPENSSL_MODULES=$(MAKEDIR)\providers "$(PERL)" "$(SRCDIR)\test\run_tests.pl" $(TESTS) @{- if ($disabled{tests}) { output_on(); } else { output_off(); } "" -} @$(ECHO) "Tests are not supported with your chosen Configure options" @@ -544,6 +542,14 @@ install_html_docs: build_html_docs uninstall_html_docs: +# Helper targets ##################################################### + +copy-utils: $(BLDDIR)\util\wrap.pl + +$(BLDDIR)\util\wrap.pl: configdata.pm + @if NOT EXIST "$(BLDDIR)\util" mkdir "$(BLDDIR)\util" + @if NOT "$(SRCDIR)"=="$(BLDDIR)" copy "$(SRCDIR)\util\$(@F)" "$(BLDDIR)\util" + # Building targets ################################################### configdata.pm: "$(SRCDIR)\Configure" {- join(" ", map { '"'.$_.'"' } @{$config{build_file_templates}}, @{$config{build_infos}}, @{$config{conf_files}}) -} -- 2.25.1