diff options
author | Richard Levitte <levitte@openssl.org> | 2002-07-16 08:53:32 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-07-16 08:53:32 +0000 |
commit | c2aa4f2081e18999ccf2ca466ac69afe67c2b291 (patch) | |
tree | 5b1b936e593b7fb1a07e5611857dc571aee52cea /Configure | |
parent | b23f50e67eecb7a381e5ed90b11eb438af596316 (diff) |
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.
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1170,7 +1170,8 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/) } open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n"; -open(OUT,">$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 (<IN>) @@ -1244,6 +1245,8 @@ while (<IN>) } 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"; @@ -1314,7 +1317,8 @@ foreach (sort split(/\s+/,$bn_ops)) } open(IN,'<crypto/opensslconf.h.in') || die "unable to read crypto/opensslconf.h.in:$!\n"; -open(OUT,'>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"; @@ -1408,6 +1412,8 @@ while (<IN>) } 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 |