[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Wed Mar 9 00:57:56 UTC 2016
The branch master has been updated
via 29eed3ddb856ab1804f65d53a673078c7f5ac38d (commit)
via 952a9d1aa334003f71310f2111a2fb01ce837042 (commit)
via 09aa263a143b006650a0f879dc2348609587b806 (commit)
from 8eb33e4f088bd12f16afddb06d6a1692373a539e (commit)
- Log -----------------------------------------------------------------
commit 29eed3ddb856ab1804f65d53a673078c7f5ac38d
Author: Richard Levitte <levitte at openssl.org>
Date: Wed Mar 9 01:17:27 2016 +0100
Adapt unix Makefile template to 'no-makedepend'
This change is a bit more complex, as it involves several recipe
variants.
Also, remove the $(CROSS_COMPILE) prefix for the makedepend program.
When we use the program "makedepend", this doesn't serve anything,
and when we use the compiler, this value isn't even used.
Reviewed-by: Rich Salz <rsalz at openssl.org>
commit 952a9d1aa334003f71310f2111a2fb01ce837042
Author: Richard Levitte <levitte at openssl.org>
Date: Wed Mar 9 01:16:10 2016 +0100
Adapt descrip.mms.tmpl to 'no-makedepend'
VMS doesn't have "makedepend" anyway, so this is just a matter of using
the right qualifiers when 'makedepend' is enabled.
Reviewed-by: Rich Salz <rsalz at openssl.org>
commit 09aa263a143b006650a0f879dc2348609587b806
Author: Richard Levitte <levitte at openssl.org>
Date: Wed Mar 9 01:14:29 2016 +0100
Add the configure option 'no-makedepend'
If no makedepend program or equaly capable compiler is present,
'makedepend' gets disabled automatically.
Reviewed-by: Rich Salz <rsalz at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
Configurations/descrip.mms.tmpl | 8 +++++++-
Configurations/unix-Makefile.tmpl | 23 ++++++++++++++++++-----
Configure | 18 +++++++++++++-----
3 files changed, 38 insertions(+), 11 deletions(-)
diff --git a/Configurations/descrip.mms.tmpl b/Configurations/descrip.mms.tmpl
index 157ebb5..7334f69 100644
--- a/Configurations/descrip.mms.tmpl
+++ b/Configurations/descrip.mms.tmpl
@@ -103,10 +103,12 @@ ENGINES={- join(", ", map { "-\n\t".$_.".EXE" } @{$unified_info{engines}}) -}
PROGRAMS={- join(", ", map { "-\n\t".$_.".EXE" } grep { !m|^\[\.test\]| } @{$unified_info{programs}}) -}
TESTPROGS={- join(", ", map { "-\n\t".$_.".EXE" } grep { m|^\[\.test\]| } @{$unified_info{programs}}) -}
SCRIPTS={- join(", ", map { "-\n\t".$_ } @{$unified_info{scripts}}) -}
+{- output_off() if $disabled{makedepend}; "" -}
DEPS={- our @deps = map { (my $x = $_) =~ s|\.o$|\$(DEP_EXT)|; $x; }
grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ }
keys %{$unified_info{sources}};
join(", ", map { "-\n\t".$_ } @deps); -}
+{- output_on() if $disabled{makedepend}; "" -}
# DESTDIR is for package builders so that they can configure for, say,
# SYS$COMMON:[OPENSSL] and yet have everything installed in STAGING:[USER].
@@ -263,6 +265,7 @@ clean : libclean
depend : descrip.mms
descrip.mms : FORCE
+ @ ! {- output_off() if $disabled{makedepend}; "" -}
@ $(PERL) -pe "if (/^# DO NOT DELETE.*/) { exit(0); }" -
< descrip.mms > descrip.mms-new
@ OPEN/APPEND DESCRIP descrip.mms-new
@@ -273,6 +276,7 @@ descrip.mms : FORCE
RENAME descrip.mms-new descrip.mms )
@ IF F$SEARCH("descrip.mms-new") .NES. "" THEN DELETE descrip.mms-new;*
-@ SPAWN/OUTPUT=NLA0: PURGE/NOLOG descrip.mms
+ @ ! {- output_on() if $disabled{makedepend}; "" -}
# Install helper targets #############################################
@@ -448,12 +452,14 @@ EOF
} @{$args{incs}}).")";
my $before = $unified_info{before}->{$obj.".OBJ"} || "\@ !";
my $after = $unified_info{after}->{$obj.".OBJ"} || "\@ !";
+ my $depbuild = $disabled{makedepend} ? ""
+ : " /MMS=(FILE=${objd}${objn}.tmp-MMS,TARGET=$obj.OBJ)"
return <<"EOF";
$obj.OBJ : $deps
${before}
SET DEFAULT $forward
- \$(CC) \$(CFLAGS)${incs} /MMS=(FILE=${objd}${objn}.tmp-MMS,TARGET=$obj.OBJ) /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
+ \$(CC) \$(CFLAGS)${incs}${depbuild} /OBJECT=${objd}${objn}.OBJ /REPOSITORY=$backward $srcs
SET DEFAULT $backward
${after}
\@ PIPE ( \$(PERL) -e "use File::Compare qw/compare_text/; my \$x = compare_text(""$obj.MMS"",""$obj.tmp-MMS""); exit(0x10000000 + (\$x == 0));" || -
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index d5a64b5..02e8cb4 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -79,9 +79,11 @@ ENGINES={- join(" ", map { dso($_) } @{$unified_info{engines}}) -}
PROGRAMS={- join(" ", map { $_.$exeext } grep { !m|^test/| } @{$unified_info{programs}}) -}
TESTPROGS={- join(" ", map { $_.$exeext } grep { m|^test/| } @{$unified_info{programs}}) -}
SCRIPTS={- join(" ", @{$unified_info{scripts}}) -}
+{- output_off() if $disabled{makedepend}; "" -}
DEPS={- join(" ", map { (my $x = $_) =~ s|\.o$|$depext|; $x; }
grep { $unified_info{sources}->{$_}->[0] =~ /\.c$/ }
keys %{$unified_info{sources}}); -}
+{- output_on() if $disabled{makedepend}; "" -}
BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
MISC_SCRIPTS=$(SRCDIR)/tools/c_hash $(SRCDIR)/tools/c_info \
@@ -178,7 +180,7 @@ RM= rm -f
RMDIR= rmdir
TAR= {- $target{tar} || "tar" -}
TARFLAGS= {- $target{tarflags} -}
-MAKEDEPEND=$(CROSS_COMPILE){- $config{makedepprog} -}
+MAKEDEPEND={- $config{makedepprog} -}
BASENAME= openssl
NAME= $(BASENAME)-$(VERSION)
@@ -259,6 +261,7 @@ clean: libclean
# was true, 1 if false, and most importantly, 2 if it doesn't
# recognise the operator.
depend:
+ @: {- output_off() if $disabled{makedepend}; "" -}
@catdepends=false; \
if [ Makefile -nt Makefile ] 2>/dev/null || [ $$? = 1 ]; then \
for d in $(DEPS); do \
@@ -283,6 +286,7 @@ depend:
rm -f Makefile.new; \
fi; \
fi
+ @: {- output_on() if $disabled{makedepend}; "" -}
# Install helper targets #############################################
@@ -874,19 +878,26 @@ EOF
dso => '$(DSO_CFLAGS)',
bin => '$(BIN_CFLAGS)' } -> {$args{intent}};
my $makedepprog = $config{makedepprog};
- if ($makedepprog eq "makedepend") {
- return <<"EOF";
+ my $recipe = "";
+ if (!$disabled{makedepend} && $makedepprog =~ /\/makedepend/) {
+ $recipe .= <<"EOF";
$obj$depext: $deps
rm -f \$\@.tmp; touch \$\@.tmp
-\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj" -- \$(CFLAGS) $ecflags$incs -- $srcs \\
2>/dev/null
sed -e 's/^.*|//' -e 's/ \\/\\(\\\\.\\|[^ ]\\)*//g' -e '/: *\$\$/d' -e '/^\\(#.*\\| *\\)\$\$/d' \$\@.tmp > \$\@
rm \$\@.tmp
-$obj$objext: $obj$depext
+EOF
+ $deps = $obj.$depext;
+ }
+ if ($disabled{makedepend} || $makedepprog =~ /\/makedepend/) {
+ $recipe .= <<"EOF";
+$obj$objext: $deps
\$(CC) \$(CFLAGS) $ecflags$incs -c -o \$\@ $srcs
EOF
}
- return <<"EOF";
+ if (!$disabled{makedepend} && $makedepprog !~ /\/makedepend/) {
+ $recipe .= <<"EOF";
$obj$objext: $deps
\$(CC) \$(CFLAGS) $ecflags$incs -MMD -MF $obj$depext.tmp -MT \$\@ -c -o \$\@ $srcs
\@touch $obj$depext.tmp
@@ -894,6 +905,8 @@ $obj$objext: $deps
mv $obj$depext.tmp $obj$depext; \\
fi
EOF
+ }
+ return $recipe;
}
# On Unix, we build shlibs from static libs, so we're ignoring the
# object file array. We *know* this routine is only called when we've
diff --git a/Configure b/Configure
index cfd8be0..17f45b0 100755
--- a/Configure
+++ b/Configure
@@ -275,6 +275,7 @@ my @disablables = (
"hw(-.+)?",
"idea",
"locking",
+ "makedepend",
"md2",
"md4",
"md5",
@@ -796,6 +797,8 @@ foreach (sort (keys %disabled))
{ }
elsif (/^dynamic-engine$/)
{ }
+ elsif (/^makedepend$/)
+ { }
elsif (/^zlib-dynamic$/)
{ }
elsif (/^sse2$/)
@@ -1094,11 +1097,11 @@ unless ($disabled{asm}) {
}
my $ecc = $target{cc};
-if ($^O ne "VMS") {
+if ($^O ne "VMS" && !$disabled{makedepend}) {
# Is the compiler gcc or clang? $ecc is used below to see if
# error-checking can be turned on.
my $ccpcc = "$config{cross_compile_prefix}$target{cc}";
- $config{makedepprog} = 'makedepend';
+ $config{makedepprog} = which('makedepend');
open(PIPE, "$ccpcc --version 2>&1 | head -2 |");
while ( <PIPE> ) {
$config{makedepprog} = $ccpcc if /clang|gcc/;
@@ -1106,9 +1109,12 @@ if ($^O ne "VMS") {
$ecc = "gcc" if /gcc/;
}
close(PIPE);
+
+ $disabled{makedepend} = "unavailable" unless $config{makedepprog};
}
+
# Deal with bn_ops ###################################################
$config{bn_ll} =0;
@@ -2335,10 +2341,12 @@ sub which
my $path;
foreach $path (split /:/, $ENV{PATH})
{
- if (-f "$path/$name$target{exe_extension}" and -x _)
+ my $fullpath = "$path/$name$target{exe_extension}";
+ if (-f $fullpath and -x $fullpath)
{
- return "$path/$name$target{exe_extension}" unless ($name eq "perl" and
- system("$path/$name$target{exe_extension} -e " . '\'exit($]<5.0);\''));
+ return $fullpath
+ unless ($name eq "perl" and
+ system("$fullpath -e " . '\'exit($]<5.0);\''));
}
}
}
More information about the openssl-commits
mailing list