Bug 16178 - Possibility for package clean to always fail
Summary: Possibility for package clean to always fail
Status: CLOSED FIXED
Alias: None
Product: R
Classification: Unclassified
Component: Windows GUI / Window specific (show other bugs)
Version: R 3.1.2
Hardware: All All
: P5 minor
Assignee: R-core
URL:
Depends on:
Blocks:
 
Reported: 2015-01-31 10:23 UTC by Rohan Shah
Modified: 2015-04-30 23:28 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rohan Shah 2015-01-31 10:23:57 UTC
In the run_clean function of tools:::.install_packages (install.R), if there is a Makefile.win the clean command is

system(paste(MAKE, "-f Makefile.win clean"))

where MAKE is defined by Sys.getenv("MAKE"). However the package build command is

res <- system(paste("make --no-print-directory", paste("-f", shQuote(makefiles), collapse = " ")))

This can lead to a rather annoying situation where if the MAKE environment variable is undefined, package building works but clean and preclean don't. This could be the desired behaviour, but I seriously doubt it. 

Suggestion: The code should should be standardised to use either "make" or Sys.getenv("MAKE") consistently.
Comment 1 Duncan Murdoch 2015-04-30 23:27:12 UTC
Fixed in R-devel and R-patched (as of rev 68285).  Please check it, I don't have a sample case to test.