2015-11-17 NOTE: This year we made R packages before we used Make. The hope is, therefore, that the Make that ships with Rtools is all we need. So hopefully we can ignore this?

back to All the automation things

### Install make on Microsoft Windows

We are still working out the best way to install make on Windows. Our current best recommendation is to install msysGit, which includes make as well as git and bash.

Download and install msysGit. The two software packages msysGit and Git for Windows are related. Both install git and bash, but only msysGit installs make. The programs installed by msysGit are found by default in C:\msysGit\bin. Here is the complete list of programs included with msysGit. For this activity, RStudio needs to be able to find in your PATH environment variable the program make, the shell bash, other utilities like rm and cp, and Rscript.

Here is another alternative for installing make alone:

• Go to the Make for Windows web site
• Install the file you just downloaded and copy to your clipboard the directory in which it is being installed
• FYI: The default directory is C:\Program Files (x86)\GnuWin32\
• You now have make installed, but you need to tell Windows where to find the program. This is called updating your PATH. You will want to update the PATH to include the bin directory of the newly installed program.

### Update your PATH

If you installed Make for Windows (as opposed to the make that comes with Git for Windows), you still need to update your PATH.

These are the steps on Windows 7 (we don’t have such a write-up yet for Windows 8 – feel free to send one!):

• Click on the Windows logo
• Right click on Computer
• Select Properties
• Select Advanced System Settings
• Select Environment variables
• Select the line that has the PATH variable. You may have to scroll down to find it
• Select Edit
• Go to the end of the line and add a semicolon ;, followed by the path where the program was installed, followed by \bin.
• Typical example of what one might add: ;C:\Program Files (x86)\GnuWin32\bin
• Click Okay and close all the windows that you opened
• Quit RStudio and open it again.
• You should now be able to use make from RStudio and the command line

### Issues we are still clarifying

See issue 58 for what seems to be the most comprehensive statement of the Windows situation.

What are the tricky bits?

• Getting the same Makefile to “work” via RStudio’s Build buttons/menus and in the shell. And, for that matter, which shell? Git Bash or ???
• Ensuring make, Rscript, pandoc, rm, etc. can be found = updating PATH.
• Getting make to use the correct shell.

back to All the automation things