projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add reallyclean target.
[openssl.git]
/
util
/
fipsas.pl
diff --git
a/util/fipsas.pl
b/util/fipsas.pl
index 6e10d7d8d5c636fdc103daddb651e3ac94b14538..1694c59a411fc52582574f262c2e902c3606d241 100644
(file)
--- a/
util/fipsas.pl
+++ b/
util/fipsas.pl
@@
-8,6
+8,9
@@
my @ARGS = @ARGV;
my $top = shift @ARGS;
my $target = shift @ARGS;
my $top = shift @ARGS;
my $target = shift @ARGS;
+my $tmptarg = $target;
+
+$tmptarg =~ s/\.[^\\\/\.]+$/.tmp/;
my $runasm = 1;
my $runasm = 1;
@@
-48,12
+51,16
@@
while (<IN>)
my ($from, $to);
my ($from, $to);
+#delete any temp file lying around
+
+unlink $tmptarg;
+
#rename target temporarily
#rename target temporarily
-rename($target,
"tmptarg.s") || die "Can't rename $target\n
";
+rename($target,
$tmptarg) || die "Can't rename $target
";
#edit target
#edit target
-open
IN,"tmptarg.s
";
-open
OUT, ">
$target";
+open
(IN,$tmptarg) || die "Can't open temporary file
";
+open
(OUT, ">$target") || die "Can't open output file
$target";
while (<IN>)
{
while (<IN>)
{
@@
-75,16
+82,12
@@
if ($runasm)
# restore target
unlink $target;
# restore target
unlink $target;
- rename
"tmptarg.s"
, $target;
+ rename
$tmptarg
, $target;
die "Error executing assembler!" if $rv != 0;
}
else
{
# Don't care about target
die "Error executing assembler!" if $rv != 0;
}
else
{
# Don't care about target
- unlink
"tmptarg.s"
;
+ unlink
$tmptarg
;
}
}
-
-
-
-