From d24d873e17d37b0a98753115f3ff27b2e05a6fea Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 16 Jul 2002 08:53:14 +0000 Subject: [PATCH] For those wanting to build for several platforms with the same source directory, making a separate directory tree with lots of symbolic links seems to be the solution. Unfortunatelt, Configure doesn't take appropriate steps to support this solution (as in removing a file that's going to be rewritten). This change corrects that situation. Now I just have to find all other places where there's lack of support for this. --- Configure | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Configure b/Configure index 51334d7f41..c1293b422b 100755 --- a/Configure +++ b/Configure @@ -1162,7 +1162,8 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/) } open(IN,'$Makefile") || die "unable to create $Makefile:$!\n"; +unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new"; +open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n"; print OUT "### Generated automatically from Makefile.org by Configure.\n\n"; my $sdirs=0; while () @@ -1236,6 +1237,8 @@ while () } close(IN); close(OUT); +rename($Makefile,"$Makefile.bak") || die "unable to rename $Makefile\n" if -e $Makefile; +rename("$Makefile.new",$Makefile) || die "unable to rename $Makefile.new\n"; print "CC =$cc\n"; print "CFLAG =$cflags\n"; @@ -1306,7 +1309,8 @@ foreach (sort split(/\s+/,$bn_ops)) } open(IN,'crypto/opensslconf.h') || die "unable to create crypto/opensslconf.h:$!\n"; +unlink("crypto/opensslconf.h.new") || die "unable to remove old crypto/opensslconf.h.new:$!\n" if -e "crypto/opensslconf.h.new"; +open(OUT,'>crypto/opensslconf.h.new') || die "unable to create crypto/opensslconf.h.new:$!\n"; print OUT "/* opensslconf.h */\n"; print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n"; @@ -1400,6 +1404,8 @@ while () } close(IN); close(OUT); +rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h"; +rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n"; # Fix the date -- 2.25.1