Commit ce192ebe authored by Richard Levitte's avatar Richard Levitte
Browse files

Remove all special make depend flags, as well as OPENSSL_DOING_MAKEDEPEND



All those flags existed because we had all the dependencies versioned
in the repository, and wanted to have it be consistent, no matter what
the local configuration was.  Now that the dependencies are gone from
the versioned Makefile.ins, it makes much more sense to use the exact
same flags as when compiling the object files.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 88297284
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -97,7 +97,6 @@ CROSS_COMPILE= {- $config{cross_compile_prefix} -}
CC= $(CROSS_COMPILE){- $target{cc} -}
CFLAGS={- our $cflags2 = join(" ",(map { "-D".$_} @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $config{cflags} -}
CFLAGS_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
DEPFLAGS= {- join(" ",map { "-D".$_} @{$config{depdefines}}) -}
LDFLAGS= {- $config{lflags} -}
PLIB_LDFLAGS= {- $config{plib_lflags} -}
EX_LIBS= {- $config{ex_libs} -}
@@ -743,9 +742,7 @@ Makefile: {- $config{build_file_template} -} $(SRCDIR)/Configure $(SRCDIR)/confi
          return <<"EOF";
$obj\$(DEP_EXT): $deps
	rm -f \$\@.tmp; touch \$\@.tmp
	\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj" \\
	    -- -DOPENSSL_DOING_MAKEDEPEND \$(DEPFLAGS)$incs \\
	    -- $srcs \\
	\$(MAKEDEPEND) -f\$\@.tmp -o"|$obj" -- \$(CFLAGS)$incs -- $srcs \\
	    2>/dev/null
	sed -e 's/^.*|//' -e 's/ \\/\\(\\\\.\\|[^ ]\\)*//g' -e '/: *\$\$/d' -e '/^\\(#.*\\| *\\)\$\$/d' \$\@.tmp > \$\@
	rm \$\@.tmp
@@ -755,7 +752,7 @@ EOF
      }
      return <<"EOF";
$obj\$(DEP_EXT): $deps
	\$(CC) -DOPENSSL_DOING_MAKEDEPEND \$(DEPFLAGS)$incs -MM -MF \$\@ -MQ $obj $srcs
	\$(CC) \$(CFLAGS)$incs -MM -MF \$\@ -MQ $obj $srcs
$obj\$(OBJ_EXT): $obj\$(DEP_EXT)
	\$(CC) \$(CFLAGS)$incs -c -o \$\@ $srcs
EOF
+0 −13
Original line number Diff line number Diff line
@@ -400,14 +400,6 @@ while ((my $first, my $second) = (shift @list, shift @list)) {
    unshift @list, $second;
}

# Construct the string of what $config{depdefines} should look like with
# the defaults from %disabled above.  (we need this to see if we should
# advise the user to run "make depend"):
my @default_depdefines =
    map { my $x = $_; $x =~ tr{[a-z]-}{[A-Z]_}; "OPENSSL_NO_$x"; }
    grep { $disabled{$_} !~ /\(no-depdefines\)$/ }
    sort keys %disabled;

# Explicit "no-..." options will be collected in %disabled along with the defaults.
# To remove something from %disabled, use "enable-foo".
# For symmetry, "disable-foo" is a synonym for "no-foo".
@@ -429,7 +421,6 @@ my $no_sse2=0;
my $user_cflags="";
my @user_defines=();
my $unified = 0;
$config{depdefines}=[];
$config{openssl_api_defines}=[];
$config{openssl_algorithm_defines}=[];
$config{openssl_thread_defines}=[];
@@ -785,7 +776,6 @@ foreach (sort (keys %disabled))
			($ALGO,$algo) = ("RMD160","rmd160") if ($algo eq "ripemd");

			push @{$config{openssl_algorithm_defines}}, "OPENSSL_NO_$ALGO";
			push @{$config{depdefines}}, "OPENSSL_NO_$ALGO";
			print " OPENSSL_NO_$ALGO";

			# fix-up crypto/directory name(s)
@@ -1097,8 +1087,6 @@ if ($^O ne "VMS") {
    close(PIPE);
}

$config{depflags} =~ s/^\s*//;


# Deal with bn_ops ###################################################

@@ -1134,7 +1122,6 @@ $config{cflags} =~ s/([\\\"])/\\\1/g;
if (defined($config{api})) {
    $config{openssl_api_defines} = [ "OPENSSL_MIN_API=".$apitable->{$config{api}} ];
    my $apiflag = sprintf("OPENSSL_API_COMPAT=%s", $apitable->{$config{api}});
    push @default_depdefines, $apiflag;
    push @{$config{defines}}, $apiflag;
}

+0 −2
Original line number Diff line number Diff line
@@ -92,7 +92,6 @@ CROSS_COMPILE= {- $config{cross_compile_prefix} -}
CC= $(CROSS_COMPILE){- $target{cc} -}
CFLAG={- our $cflags2 = join(" ",(map { "-D".$_} @{$config{defines}}),"-DOPENSSLDIR=\"\\\"\$(OPENSSLDIR)\\\"\"","-DENGINESDIR=\"\\\"\$(ENGINESDIR)\\\"\"") -} {- $config{cflags} -}
CFLAG_Q={- $cflags2 =~ s|([\\"])|\\$1|g; $cflags2 -} {- $config{cflags} -}
DEPFLAG= {- join(" ",map { "-D".$_} @{$config{depdefines}}) -}
LDFLAG= {- $config{lflags} -}
PLIB_LDFLAG= {- $config{plib_lflags} -}
EX_LIBS= {- $config{ex_libs} -}
@@ -254,7 +253,6 @@ BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
		DESTDIR='$(DESTDIR)'		\
		INSTALLTOP='$(INSTALLTOP)' OPENSSLDIR='$(OPENSSLDIR)'	\
		LIBDIR='$(LIBDIR)'				\
		DEPFLAG='$(DEPFLAG)'                    	\
		SHARED_LDFLAG='$(SHARED_LDFLAG)'		\
		SHARED_RCFLAG='$(SHARED_RCFLAG)'		\
		ZLIB_INCLUDE='$(ZLIB_INCLUDE)' LIBZLIB='$(LIBZLIB)'	\
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ uninstall:
generate: openssl-vms.cnf progs.h

depend:
	$(TOP)/util/domd $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(EXE_SRC)
	$(TOP)/util/domd $(CFLAG) $(INCLUDES) -- $(EXE_SRC)

clean:
	rm -f *.o *.obj *.dll lib tags core .pure .nfs* *.old *.bak fluff $(EXE)
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ libs:

depend:
	@[ -z "$(THIS)" -o -f buildinf.h ] || touch buildinf.h # fake buildinf.h if it does not exist
	@[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDE) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
	@[ -z "$(THIS)" ] || $(TOP)/util/domd $(CFLAG) $(INCLUDE) -- $(PROGS) $(LIBSRC)
	@[ -z "$(THIS)" -o -s buildinf.h ] || rm buildinf.h
	@[ -z "$(THIS)" ] || (set -e; target=depend; $(RECURSIVE_MAKE) )
	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
Loading