diff options
author | Christopher Faylor <me@cgf.cx> | 2009-04-12 05:11:08 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2009-04-12 05:11:08 +0000 |
commit | 73bd57524a80a46826a5a71e1b34305df7471e09 (patch) | |
tree | c091b486086899d71733433a5bbe3f674815c642 /winsup/cygwin/speclib | |
parent | d129941aefc7860b9bd0b6f1e464c96b3374914a (diff) | |
download | newlib-73bd57524a80a46826a5a71e1b34305df7471e09.zip newlib-73bd57524a80a46826a5a71e1b34305df7471e09.tar.gz newlib-73bd57524a80a46826a5a71e1b34305df7471e09.tar.bz2 |
* speclib: Initial stab at cleaning up temp files. More work needed.
* mkimport: Ditto.
Diffstat (limited to 'winsup/cygwin/speclib')
-rwxr-xr-x | winsup/cygwin/speclib | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib index 80ef233..8074408 100755 --- a/winsup/cygwin/speclib +++ b/winsup/cygwin/speclib @@ -1,6 +1,6 @@ #!/usr/bin/perl use Getopt::Long; -use File::Temp qw'tempdir'; +use File::Temp; use File::Basename; use File::Spec; use strict; @@ -43,11 +43,14 @@ close $nm_fd; %extract or die "$0: couldn't find symbols for $lib\n"; -my $dir = tempdir(CLEANUP => 1); +my $dir = File::Temp->newdir(); chdir $dir; # print join(' ', '+', $ar, 'x', sort keys %extract), "\n"; my $res = system $ar, 'x', $libdll, sort keys %extract; die "$0: $ar extraction exited with non-zero status\n" if $res; unlink $lib; -exec $ar, 'crus', $lib, sort keys %extract; +$res = system $ar, 'crus', $lib, sort keys %extract; +unlink keys %extract; +die "$0: ar creation of $lib exited with non-zero status\n" if $res; +exit 0; |