summaryrefslogtreecommitdiffstats
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-04-12 05:11:08 +0000
committerChristopher Faylor <me@cgf.cx>2009-04-12 05:11:08 +0000
commit73bd57524a80a46826a5a71e1b34305df7471e09 (patch)
treec091b486086899d71733433a5bbe3f674815c642 /winsup
parentd129941aefc7860b9bd0b6f1e464c96b3374914a (diff)
downloadcygnal-73bd57524a80a46826a5a71e1b34305df7471e09.tar.gz
cygnal-73bd57524a80a46826a5a71e1b34305df7471e09.tar.bz2
cygnal-73bd57524a80a46826a5a71e1b34305df7471e09.zip
* speclib: Initial stab at cleaning up temp files. More work needed.
* mkimport: Ditto.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rwxr-xr-xwinsup/cygwin/mkimport4
-rwxr-xr-xwinsup/cygwin/speclib9
3 files changed, 14 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index db1e19ee3..8069d646e 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
+ * speclib: Initial stab at cleaning up temp files. More work needed.
+ * mkimport: Ditto.
+
+2009-04-12 Christopher Faylor <me+cygwin@cgf.cx>
+
* Makefile.in (clean): Clean globals.h.
(LIBCOS): Depend on globals.h.
diff --git a/winsup/cygwin/mkimport b/winsup/cygwin/mkimport
index 58c604180..99d8ef049 100755
--- a/winsup/cygwin/mkimport
+++ b/winsup/cygwin/mkimport
@@ -77,4 +77,6 @@ for my $f (keys %text) {
}
unlink $libdll;
-exec $ar, 'crus', $libdll, glob('*.o'), @ARGV;
+system $ar, 'crus', $libdll, glob('*.o'), @ARGV;
+unlink glob('*.o');
+exit 1 if $?;
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/speclib
index 80ef23301..80744083a 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;