-1

I am hoping there are some Windows command-line wizards here. If there are, I am forever in your debt.

I have used R (and related tools) on Linux for years. I do everything in emacs if I can. My fingers are just happier that way.

To ensure my analysis is reproducible, I write a makefile for each report / analysis in a project. I use a combination of R and pandoc to produce reports these days. Once my makefile is written, I simply open a shell and enter:

make -f my_target

And my computer runs my analysis. Easy. On Linux.

I have recently started a job with the government and my computer is running Windows and I no longer have make, except through mingw and neither emacs nor gitbash recognize make. I would like to be able to run make (or something equivalent) from both (or either) emacs / gitbash to run my code in a coherent / sane manner.

Thus my question is this. How can I use make, which is currently ONLY accessible through a msys shell and not connected to either gitbash or emacs or what other tool should I move to so I can continue to "build" my reports in a sane / reproducible manner?

If I am better off learning a new tool, that is fine. If there is some way to run mingw's make from emacs / gitbash that is good too. I am open to suggestions. Most of the tutorials on-line are for Windows programmers moving to Linux. There aren't as many resources for us moving from Linux to Windows (which is understandable).

Choens
  • 1,312
  • 2
  • 14
  • 23
  • 1
    Have you seen [this answer](http://stackoverflow.com/questions/12881854/how-to-use-gnu-make-on-windows)? I am having trouble understanding why make is only available to msys shell. – nograpes Apr 25 '14 at 15:31
  • Also, have you checked out Cygwin? It is a nice way to get some Linux tools into Windows. – nograpes Apr 25 '14 at 15:33
  • I have thought about Cygwin. My other concern is that I am trying to teach my new staff how to do data science in this manner and I don't want to overload them with new tools. But this may be what I need to do. – Choens Apr 25 '14 at 15:35
  • 1
    @nograpes Doesn't the accepted answer seem to imply that MSYS is set up to understand `make` as an alias for the actual name of that executable, `mingw-make.exe`? If that's the case, it's understandable that no other would know where it "should" be looking when you type `make`... (Re: Cygwin, I'm a Windows user who would very much like to have something that does what it **aims** to do, but have found it's got so many frustrating little differences/flaws that I've pretty much given up on it. Probably not something you want to subject your staff to!) – Josh O'Brien Apr 25 '14 at 15:35
  • @JoshO'Brien Right. I didn't get that immediately. – nograpes Apr 25 '14 at 15:38
  • I'd say make is not cross-platform. https://stackoverflow.com/questions/23297156/cross-platform-make-replacement – anatoly techtonik Jan 06 '15 at 19:40
  • I agree. In the end, I wound up teaching the idea, not make. The idea of make is that it gives you a centralized place to control the compilation process. For the work we do, compiling something tends to mean producing PDFs from LaTeX. So, I wound up teaching my staff to create a file . . . usually called make.R that is a function or script that can produce the report and any ancillary slides or supports. – Choens Jan 07 '15 at 14:25

1 Answers1

1

After much swearing and gnashing of teeth, I finally figured out what I did wrong.

I followed the installation instructions for MinGW, but I made a typo when I altered my user's path. Thus, MinGW was NOT in my path.

Following these instructions work, but it isn't smart enough to fix your typographical errors.

Getting Started

Choens
  • 1,312
  • 2
  • 14
  • 23
  • I am the first to admit that I am not an expert at developing on Windows. It just seems harder somehow than what I am used to. – Choens May 01 '14 at 23:56