From mtmorgan at fhcrc.org  Thu Nov 24 19:28:58 2005
From: mtmorgan at fhcrc.org (Martin Morgan)
Date: Thu, 24 Nov 2005 10:28:58 -0800
Subject: [Rd] Windows R CMD build <pkg> leftovers
Message-ID: <6phacftq4r9.fsf@gopher3.fhcrc.org>

A command

R CMD build  <pkg>

that fails, e.g., because of C code compilation errors, leaves a
directory %TMPDIR%/Rinst.xxx containing the file R.css. Although R
CMD INSTALL --build cleans up after itself, build does not. A fix is
below. Also, build.in references Rcmd.exe, which I thought was no
longer necessary?

Index: build.in
===================================================================
--- build.in	(revision 36450)
+++ build.in	(working copy)
@@ -434,6 +434,8 @@
 	    if($doit && R_system($cmd)) {
 		$log->error();
 		$log->print("Installation failed.\n");
+		$log->print("Removing '$libdir'\n");
+		rmtree($libdir);
 		exit(1);
 	    }
 	    my $R_LIBS = $ENV{'R_LIBS'};



[Rd] Windows R CMD build <pkg> leftovers
Martin Morgan