Commit 0190de80 authored by Richard Levitte's avatar Richard Levitte
Browse files

Remove remaining variables for symlinked/copied headers and tests



GitConfigure:   no more 'no-symlinks'

util/bat.sh, util/mk1mf.pl, util/pl/VC-32.pl, util/pl/unix.pl:
- Remove all uses of EXHEADER.
  That includes removing the use if INC_D and INCO_D.
- Replace the check for TEST with a check for [A-Z0-9_]*TEST.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent a80e33b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@


BRANCH=`git rev-parse --abbrev-ref HEAD`
BRANCH=`git rev-parse --abbrev-ref HEAD`


./Configure $@ no-symlinks
./Configure $@
make files
make files
util/mk1mf.pl OUT=out.$BRANCH TMP=tmp.$BRANCH INC=inc.$BRANCH copy > makefile.$BRANCH
util/mk1mf.pl OUT=out.$BRANCH TMP=tmp.$BRANCH INC=inc.$BRANCH copy > makefile.$BRANCH
MAKE=make
MAKE=make
+0 −3
Original line number Original line Diff line number Diff line
@@ -37,9 +37,6 @@ for (;;)
		$lib =~ s/^.*\/([^\/]+)$/$1/;
		$lib =~ s/^.*\/([^\/]+)$/$1/;
		}
		}


	if ($key eq "EXHEADER")
		{ $exheader.=&var_add($dir,$val); }

	if ($key eq "HEADER")
	if ($key eq "HEADER")
		{ $header.=&var_add($dir,$val); }
		{ $header.=&var_add($dir,$val); }


+8 −32
Original line number Original line Diff line number Diff line
@@ -396,7 +396,7 @@ for (;;)
	if ($key eq "EX_LIBS")
	if ($key eq "EX_LIBS")
		{ $ex_libs .= " $val" if $val ne "";}
		{ $ex_libs .= " $val" if $val ne "";}


	if ($key eq "TEST" && (!$fipscanisteronly || $dir =~ /^fips/ ))
	if ($key =~ /^[A-Z0-9_]*TEST$/ && (!$fipscanisteronly || $dir =~ /^fips/ ))
		{ $test.=&var_add($dir,$val, 0); }
		{ $test.=&var_add($dir,$val, 0); }


	if (($key eq "PROGS") || ($key eq "E_OBJ"))
	if (($key eq "PROGS") || ($key eq "E_OBJ"))
@@ -414,9 +414,6 @@ for (;;)
		$otherlibs .= " $lib";
		$otherlibs .= " $lib";
		}
		}


	if ($key eq "EXHEADER")
		{ $exheader.=&var_add($dir,$val, 1); }

	if ($key eq "HEADER")
	if ($key eq "HEADER")
		{ $header.=&var_add($dir,$val, 1); }
		{ $header.=&var_add($dir,$val, 1); }


@@ -454,7 +451,6 @@ if ($orig_platform eq 'copy')
	{
	{
	# Remove opensslconf.h so it doesn't get updated if we configure a
	# Remove opensslconf.h so it doesn't get updated if we configure a
	# different branch.
	# different branch.
	$exheader =~ s/[^ ]+\/opensslconf.h//;
	$header =~ s/[^ ]+\/opensslconf.h//;
	$header =~ s/[^ ]+\/opensslconf.h//;
	}
	}


@@ -568,7 +564,7 @@ if ($fipscanisteronly)
$cp2 = $cp unless defined $cp2;
$cp2 = $cp unless defined $cp2;


$extra_install= <<"EOF";
$extra_install= <<"EOF";
	\$(CP) \"\$(INCO_D)${o}*.\[ch\]\" \"\$(INSTALLTOP)${o}include${o}openssl\"
	\$(CP) \"include${o}openssl${o}*.\[ch\]\" \"\$(INSTALLTOP)${o}include${o}openssl\"
	\$(CP) \"\$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin\"
	\$(CP) \"\$(BIN_D)$o\$(E_EXE)$exep \$(INSTALLTOP)${o}bin\"
	\$(MKDIR) \"\$(OPENSSLDIR)\"
	\$(MKDIR) \"\$(OPENSSLDIR)\"
	\$(CP) apps${o}openssl.cnf \"\$(OPENSSLDIR)\"
	\$(CP) apps${o}openssl.cnf \"\$(OPENSSLDIR)\"
@@ -581,8 +577,8 @@ if ($fipscanisteronly)
	\$(CP) \"\$(O_FIPSCANISTER).sha1\" \"\$(INSTALLTOP)${o}lib\"
	\$(CP) \"\$(O_FIPSCANISTER).sha1\" \"\$(INSTALLTOP)${o}lib\"
	\$(CP2) \"fips${o}fips_premain.c\" \"\$(INSTALLTOP)${o}lib\"
	\$(CP2) \"fips${o}fips_premain.c\" \"\$(INSTALLTOP)${o}lib\"
	\$(CP) \"fips${o}fips_premain.c.sha1\" \"\$(INSTALLTOP)${o}lib\"
	\$(CP) \"fips${o}fips_premain.c.sha1\" \"\$(INSTALLTOP)${o}lib\"
	\$(CP) \"\$(INCO_D)${o}fips.h\" \"\$(INSTALLTOP)${o}include${o}openssl\"
	\$(CP) \"include${o}openssl${o}fips.h\" \"\$(INSTALLTOP)${o}include${o}openssl\"
	\$(CP) \"\$(INCO_D)${o}fips_rand.h\" \"\$(INSTALLTOP)${o}include${o}openssl\"
	\$(CP) \"include${o}openssl${o}fips_rand.h\" \"\$(INSTALLTOP)${o}include${o}openssl\"
	\$(CP) "\$(BIN_D)${o}fips_standalone_sha1$exep" \"\$(INSTALLTOP)${o}bin\"
	\$(CP) "\$(BIN_D)${o}fips_standalone_sha1$exep" \"\$(INSTALLTOP)${o}bin\"
	\$(CP) \"util${o}fipslink.pl\" \"\$(INSTALLTOP)${o}bin\"
	\$(CP) \"util${o}fipslink.pl\" \"\$(INSTALLTOP)${o}bin\"
EOF
EOF
@@ -662,9 +658,6 @@ FIPSLINK=\$(PERL) util${o}fipslink.pl
OUT_D=$out_dir
OUT_D=$out_dir
# The output directory for all the temporary muck
# The output directory for all the temporary muck
TMP_D=$tmp_dir
TMP_D=$tmp_dir
# The output directory for the header files
INC_D=$inc_dir
INCO_D=$inc_dir${o}openssl


PERL=$perl
PERL=$perl
PERLASM_SCHEME=$mf_perlasm_scheme
PERLASM_SCHEME=$mf_perlasm_scheme
@@ -726,7 +719,7 @@ L_LIBS= \$(L_SSL) \$(L_CRYPTO) $ex_l_libs
# Don't touch anything below this point
# Don't touch anything below this point
######################################################
######################################################


INC=-I\$(INC_D) -I\$(INCL_D) -I\$(SRC_D)${o}crypto${o}include
INC=-I\$(SRC_D)${o}include -I\$(INCL_D) -I\$(SRC_D)${o}crypto${o}include
APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG)
APP_CFLAGS=\$(INC) \$(CFLAG) \$(APP_CFLAG)
LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG)
LIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG)
SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG)
SHLIB_CFLAGS=\$(INC) \$(CFLAG) \$(LIB_CFLAG) \$(SHLIB_CFLAG)
@@ -736,7 +729,7 @@ LIBS_DEP=$libs_dep
EOF
EOF


$rules=<<"EOF";
$rules=<<"EOF";
all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) \$(INCO_D) headers \$(FIPS_SHA1_EXE) $build_targets
all: banner \$(TMP_D) \$(BIN_D) \$(TEST_D) \$(LIB_D) headers \$(FIPS_SHA1_EXE) $build_targets


banner:
banner:
$banner
$banner
@@ -753,18 +746,11 @@ $banner
\$(LIB_D):
\$(LIB_D):
	\$(MKDIR) \"\$(LIB_D)\"
	\$(MKDIR) \"\$(LIB_D)\"


\$(INCO_D): \$(INC_D)
	\$(MKDIR) \"\$(INCO_D)\"

\$(INC_D):
	\$(MKDIR) \"\$(INC_D)\"

# This needs to be invoked once, when the makefile is first constructed, or
# This needs to be invoked once, when the makefile is first constructed, or
# after cleaning.
# after cleaning.
init: \$(TMP_D) \$(LIB_D) \$(INC_D) \$(INCO_D) \$(BIN_D) \$(TEST_D) headers
init: \$(TMP_D) \$(LIB_D) \$(BIN_D) \$(TEST_D) headers
	\$(PERL) \$(SRC_D)/util/copy-if-different.pl "\$(SRC_D)/crypto/opensslconf.h" "\$(INCO_D)/opensslconf.h"


headers: \$(HEADER) \$(EXHEADER)
headers: \$(HEADER)


lib: \$(LIBS_DEP) \$(E_SHLIB)
lib: \$(LIBS_DEP) \$(E_SHLIB)


@@ -790,7 +776,6 @@ reallyclean:
	\$(RM) -rf \$(BIN_D)
	\$(RM) -rf \$(BIN_D)
	\$(RM) -rf \$(TEST_D)
	\$(RM) -rf \$(TEST_D)
	\$(RM) -rf \$(LIB_D)
	\$(RM) -rf \$(LIB_D)
	\$(RM) -rf \$(INC_D)


EOF
EOF


@@ -844,20 +829,11 @@ close(OUT);
foreach (keys %lib_obj) { $lib_obj{$_}=&clean_up_ws($lib_obj{$_}); }
foreach (keys %lib_obj) { $lib_obj{$_}=&clean_up_ws($lib_obj{$_}); }
$test=&clean_up_ws($test);
$test=&clean_up_ws($test);
$e_exe=&clean_up_ws($e_exe);
$e_exe=&clean_up_ws($e_exe);
$exheader=&clean_up_ws($exheader);
$header=&clean_up_ws($header);
$header=&clean_up_ws($header);


# First we strip the exheaders from the headers list
foreach (split(/\s+/,$exheader)){ $h{$_}=1; }
foreach (split(/\s+/,$header))	{ $h.=$_." " unless $h{$_}; }
chop($h); $header=$h;

$defs.=&do_defs("HEADER",$header,"\$(INCL_D)","");
$defs.=&do_defs("HEADER",$header,"\$(INCL_D)","");
$rules.=&do_copy_rule("\$(INCL_D)",$header,"");
$rules.=&do_copy_rule("\$(INCL_D)",$header,"");


$defs.=&do_defs("EXHEADER",$exheader,"\$(INCO_D)","");
$rules.=&do_copy_rule("\$(INCO_D)",$exheader,"");

$defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj);
$defs.=&do_defs("T_OBJ",$test,"\$(OBJ_D)",$obj);
$rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)");
$rules.=&do_compile_rule("\$(OBJ_D)",$test,"\$(APP_CFLAGS)");


+0 −4
Original line number Original line Diff line number Diff line
@@ -284,10 +284,6 @@ $(OBJ_D)\applink.obj: ms\applink.c
	$(CC) /Fo$(OBJ_D)\applink.obj $(APP_CFLAGS) -c ms\applink.c
	$(CC) /Fo$(OBJ_D)\applink.obj $(APP_CFLAGS) -c ms\applink.c
$(OBJ_D)\uplink.obj:	ms\uplink.c ms\applink.c
$(OBJ_D)\uplink.obj:	ms\uplink.c ms\applink.c
	$(CC) /Fo$(OBJ_D)\uplink.obj $(SHLIB_CFLAGS) -c ms\uplink.c
	$(CC) /Fo$(OBJ_D)\uplink.obj $(SHLIB_CFLAGS) -c ms\uplink.c
$(INCO_D)\applink.c:	ms\applink.c
	$(CP) ms\applink.c $(INCO_D)\applink.c

EXHEADER= $(EXHEADER) $(INCO_D)\applink.c


LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj
LIBS_DEP=$(LIBS_DEP) $(OBJ_D)\applink.obj
CRYPTOOBJ=$(OBJ_D)\uplink.obj $(CRYPTOOBJ)
CRYPTOOBJ=$(OBJ_D)\uplink.obj $(CRYPTOOBJ)
+2 −3
Original line number Original line Diff line number Diff line
@@ -409,7 +409,8 @@ sub get_tests
		 'serverinfo.pem',
		 'serverinfo.pem',
	       );
	       );
  my $copies = copy_scripts(1, 'test', @copies);
  my $copies = copy_scripts(1, 'test', @copies);
  $copies .= copy_scripts(0, 'test', ('smcont.txt'));
  $copies .= copy_scripts(0, 'test', ('smcont.txt', 'evptests.txt'));



  my @utils = ( 'shlib_wrap.sh',
  my @utils = ( 'shlib_wrap.sh',
		'opensslwrap.sh',
		'opensslwrap.sh',
@@ -422,8 +423,6 @@ sub get_tests
	     );
	     );
  $copies .= copy_scripts(1, 'apps', @apps);
  $copies .= copy_scripts(1, 'apps', @apps);


  $copies .= copy_scripts(1, 'crypto/evp', ('evptests.txt'));

  $scripts = "test_scripts: \$(TEST_D)/CA.sh \$(TEST_D)/opensslwrap.sh \$(TEST_D)/openssl.cnf \$(TEST_D)/shlib_wrap.sh ocsp smime\n";
  $scripts = "test_scripts: \$(TEST_D)/CA.sh \$(TEST_D)/opensslwrap.sh \$(TEST_D)/openssl.cnf \$(TEST_D)/shlib_wrap.sh ocsp smime\n";
  $scripts .= "\nocsp:\n\tcp -R test/ocsp-tests \$(TEST_D)\n";
  $scripts .= "\nocsp:\n\tcp -R test/ocsp-tests \$(TEST_D)\n";
  $scripts .= "\smime:\n\tcp -R test/smime-certs \$(TEST_D)\n";
  $scripts .= "\smime:\n\tcp -R test/smime-certs \$(TEST_D)\n";